n = int(input()) # 筛素数 is_prime = [True] * n for i in range(2, n): if is_prime[i]: for j in range(i*i, n, i): is_prime[j] = False # 两数均为素数 for i in range(n//2, 1, -1): if is_prime[i] and is_prime[n-i]: print(i) print(n-i) break