import math

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