def simple while if return False return True int input for in range if

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
def simple(k):
i = 2
while i <= k ** 0.5:
if k % i == 0:
return False
i += 1
return True
N = int(input())
for i in range(2, N - 1):
if simple(i) == True:
if simple(N - i) == True:
print(i, N - i)
break