import math
x=int(input())
a=b=x+1
n=int(math.sqrt(x))+1
for i in range(1,n):
    if ((x%i)==0):
        y=x//i
        if (i*y==math.gcd(i,y)*x):
            if (y<b):
                a=i
                b=y
print(a,b)