import sys

def mcd(p,q):
    if p%q==0:
        return q
    return mcd(q, p%q)

def mcm(a,b):
    return a // mcd(a, b) * b

a=int(sys.stdin.readline())
if a == 1:
    print(1,1)
else:
    ans=0
    i=1
    while i*i<=a:
        if a % i==0 and mcm(i, a//i)==a:
                ans=i
        i+=1
    print(ans, a//ans)
