from math import sqrt, floor, gcd
x = int(input().strip())
y = floor(sqrt(x))
val = x
for i in range(2, y+1):
    if (x%i==0):
        j = x//i
        if ((i*j)//gcd(j, i) == x):
            val = max(i, j)
print(x//val, val)
