from math import gcd,floor,sqrt
def lcm(a,b,c):return a==(b*c)//gcd(b,c)
def prim(a):
    k=int(1e12);k1=k
    for i in range(2,floor(sqrt(a))+1):
        if a%i==0 and lcm(a,i,a//i) and max(k,k1)>max(i,a//i):k=i;k1=a//i
    if k==int(1e12)==k1:print(1,a)
    else:print(k,k1)
prim(int(input()))