n=int(input()) for i in range(n): if i!=7 and n-i!=7: print(i,n-i) break