from math import sqrt
n=int(input())

if(n==1):
    print(1,1)
elif(n==4):
    print(1,4)
else:
    for i in range( int(sqrt(n))+1,1,-1 ):
        if(n%i==0):
            if(i<n//i):
                print(i, n//i)
                break
            elif(i>n//i):
                print(n//i,i)
                break
            
