import math
def lcm(a,b):
    a=int(a)
    b=int(b)
    return (a*b)/math.gcd(a,b)
def fun(n):
    for i in range(1,int(n**0.5)+1):
        if n%i==0 and lcm(i,n/i)==n:
            ans=i
    return ans
    
n=int(input())
ans=fun(n)
print(ans,n//ans)