from math import gcd
n = int(input())
minm = pow(10,15)
ans = (0,0)
for d in range(1,int(n**(1/2)) + 1):
    if n%d==0 and gcd(d,n//d) == 1 and d+n//d< minm:
        minm = d+n//d
        ans = (d,n//d)
print(ans[0],ans[1])
        