def is_power_of_two(n): binary = bin(n)[3:] for b in binary: if b == "1": return False return True def main(): N = int(input()) a = 3 while True: b = N - a if b <= 2: print(-1) return if not is_power_of_two(b): print(a, b) return a += 2 main()