z = int(input()) for i in range(2,z//2): if z % i == 0: print(i,z//i)