import math m = int(input()) if m%2==0: print(2,m//2) else: for i in range(3,int(math.sqrt(m))+1,2): if not m%i: print(i,m//i) break else: print(1,m)