n=int(input()) for i in range(2,min(n,10**6)): if n%i==0: print(i,n//i) print(1,n)