from math import log2 n = int(input()) for i in range(3, n//2+1): if log2(i) != int(log2(i)) and log2(n-i) != int(log2(n-i)): print(i, n-i) break else: print(-1)