import math

def lcm(a,b):
    return int((a*b)/int(math.gcd(a,b)))

n=int(input())
a=1000000000000000000
b=1000000000000000000
for x in range(1,int(math.sqrt(n))+1):
    c=lcm(x,int(n/x))
    if n%x==0 and c==n:
        if max(x,n/x)<max(a,b):
            a=x
            b=int(n/x)
print(a,b)
