from math import sqrt,gcd
def lcm(a,b):
    return a*b/gcd(a,b)
n = int(input())
index = 1
m = float('inf')
for i in range(1,int(sqrt(n))+1):
    if n%i==0 and lcm(i,int(n/i))==n:
        if max(i,n/i)<m:
            m = max(i,n/i)
            index = i
print(index,int(n/index))
