# cook your dish here
import math
n=int(input())
ans=n
p=1
q=n
for i in range(1,int(math.sqrt(n))+1):
    if(n%i==0):
        a=i
        b=n//i
        if(max(a,b)<ans and math.gcd(a,b)==1):
            p=a
            q=b
print(p,q)