from math import gcd, sqrt, ceil
from sys import stdin

def lcm(a,b):
    lcm=(a/gcd(a,b))*b
    return lcm


num=int(stdin.readline())
ans=1
for i in range(1,ceil(sqrt(num))+1):
    if (num%i==0 and lcm(i,num//i)==num):
        ans=i
print(ans,int(num/ans))