n=int(input()) for x in range(~-n,n//2-1,-1): if n%x==0:print(x,n//x);exit() print(1,n)