import sys #判断是否素数 def is_prime(num): if num == 1: return False for i in range(2, int(num**0.5) + 1): if num % i == 0: return False return True while True: try: n = int(input()) p_start = n // 2 #从n的一半开始找,这样找出来的差值就最小 for i in range(p_start, n): if is_prime(i) and is_prime(n - i): print(n - i) print(i) break except: # print(sys.exc_info()) break