import sys
input=sys.stdin.readline
import math
def gcd(a, b):  
    if a == 0 : 
        return b  
      
    return gcd(b%a, a) 
t=int(input())
m=1000000000000
tup=[]
for i in range(1,int(t**0.5)+1):
    if(t%i==0):
        j=t//i
        if(gcd(i,j)==1):
            if(m>max(i,j)):
                tup=[i,j]
                m=max(i,j)
print(tup[0],tup[1])


