MOD = 10 ** 9 + 7 INF = 10 ** 15 def main(): N = int(input()) if N <= 5: print(-1) return for i in range(3,6,2): j = N - i if j//(j & -j) != 1: print(i,j) return print(-1) if __name__ == '__main__': main()