import math
X = int(input())
if X == 1:print(1, 1);quit()
for i in range(int(math.sqrt(X)), 0, -1):
    if X % i == 0 and i != X//i:
        if math.gcd(i, X//i) == 1:
            ans = (i, X//i);break
print(*ans) 