from math import sqrt,gcd
def solve(x):
    i=2;ans=[1,x]
    while i<=sqrt(x):
        if x%i==0 and max(ans)>max(i,x//i) and x//gcd(i,x//i)==x:ans=[i,x//i]
        i+=1
    return ans
x=int(input());print(*solve(x))
