import math as m
n=int(input())
k=int(n**(0.5))
a=0;b=0;c=100000000000000;
for i in range(1,k+1):
    if(n%i==0):
        if(m.gcd(i,n//i)==1):
            if(max(i,n//i)<c): c=max(i,n//i); a=i; b=n//i;
print(a,b)
