def GCD(a,b):
    if(b==0):
        return a
    else:
        return GCD(b,a%b)

x = int(input())
i=1
l=0
r=0
while(i*i<x):
    if(x%i==0 and GCD(x/i,i)==1):
        l=i
        r=x/i
    i=i+1
if(x==1):
    print(1,' ',1)
else:
    print(int(l),' ',int(r))
