def gcd(a,b):
    if (b == 0): 
         return a 
    return gcd(b, a%b)

a=int(input())
b=int(a**(1/2))
for i in range(b,0,-1):
    if(a%i==0):
        lcm=(a)//(gcd(i,a//i))
        if(lcm==a):
            print(i,a//i)
            break