lst=[]
a=int(input())
for i in range(2,a):
for j in range(2,i):
if i%j==0:
break
else:
lst.append(i)
for i in lst:
for j in lst:
if i+j==a:
break
if i+j==a:
break
print(i,j)
bHN0PVtdCmE9aW50KGlucHV0KCkpCmZvciBpIGluIHJhbmdlKDIsYSk6CiAgICBmb3IgaiBpbiByYW5nZSgyLGkpOgogICAgICAgIGlmIGklaj09MDoKICAgICAgICAgICAgYnJlYWsKICAgIGVsc2U6CiAgICAgICAgbHN0LmFwcGVuZChpKQoKZm9yICBpIGluIGxzdDoKICAgIGZvciBqIGluIGxzdDoKICAgICAgICBpZiBpK2o9PWE6CiAgICAgICAgICAgIGJyZWFrCiAgICBpZiBpK2o9PWE6CiAgICAgICAgYnJlYWsKcHJpbnQoaSxqKQ==