import math

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

def lcm(a,b):
    ans = (a*b)//gcd(a,b)
    return ans

n = int(input())
ans = n
a1 = 1
a2 = n
for i in range(1,int(math.ceil(math.sqrt(n)))+1):
    if n%i == 0:
        if lcm(i,n//i) == n:
            maxi = max(i,n//i)
            if ans > maxi:
                a1=i
                a2=n//i
                ans = maxi
print(a1,a2)
