n = int(input()) nl = [2**i for i in range(61)] for i in range(1, n): if not i in nl and not n-i in nl: print(i, n-i) break else: print(-1)