from sys import stdin
def gcd(a,b):
    while a%b:
        t = a%b
        a = b
        b = t
    return b
n = int(stdin.readline())
a,b = 1,n
i = 2
while i*i <=n:
    if n%i==0:
        j = n/i
        if gcd(i,j)==1:
            a,b = i,j
    i+=1
print a,b