def gcd(a,b):
    if a*b==0:
        return max(a,b)
    elif a>b:
        return gcd(a%b,b)
    else:
        return gcd(a,b%a)
import math
def intsqrt(n):
    return math.floor(math.sqrt(n))
def ans(n):
    n1=intsqrt(n)
    for i in range(n1,0,-1):
        if n%i==0 and gcd(i,n//i)==1:
            return [i,n//i]
n=int(input())
array=ans(n)
print(" ".join(map(str,array)))