x = int(input())
for i in range(2,x+1):
    if x % i == 0:
        print(x,i)
        exit()
print('-1')