import math

def gcd(a,b):
    if b==0:
        return a
    else:
        return gcd(b,a%b)

def factorize(x):
    i = int(math.sqrt(x))
    while i>0:
        if x%i == 0 and gcd(i,x//i)==1:
            return (i,x//i)
        i -= 1

X = int(input())
(a,b) = factorize(X)
print(a,b)