from math import gcd,sqrt
n = int(input())
def lcm(a,b):
    return a*b//gcd(a,b)
c =[]
for i in range(int(sqrt(n)),0,-1):
    if n%i==0:
        if lcm(i,n//i)==n:
            c.append(i)
            c.append(n//i)
            break
print(c[-2],c[-1])