x=int(input())
from math import sqrt
factorlist=[]

def gcd(a,b):
    #euclids algorithm
    c=max(a,b)
    d=min(a,b)
    while d!=0:
        c,d=d,c%d
    return c

for i in range(1,int(sqrt(x))+1):
    if x%i==0 and gcd(i,x//i)==1:
        factorlist.append(i)

print(str(min(factorlist))+" "+str(x//(min(factorlist))))