from math import gcd
from math import sqrt
from math import ceil
def lcm(a,b):
    lcm= a*b//(gcd(a,b))
    return lcm
x=int(input())
ans=x
for i in range(1,ceil(sqrt(x))):
    if x%i==0:
        a=i
        b=x//i
        c=max(a,b)
        if c<ans and lcm(a,b)==x:
            ans=c
print(min(ans,x//ans),max(ans,x//ans))
    
