import math

n=int(input())
 
i=n**0.5
if i%1==0:
    i-=1
else:
    i=i//1
 
if n%2==0:
    k=1
 
else:
    k=2
    if i%2==0:
        i-=1
 
if n<=3:
    i=1
 
else:
    while i>0:
        if n%i==0:
            if math.gcd(int(i),int(n/i))!=1:
                i-=k
                continue
            break
        i-=k

print(int(i),int(n/i))