from math import gcd

x = int(input())
arr = []
for a in range(1, x+1):
    if a * a > x:
        break
    b = x // a
    if a * b == x:
        arr.append((a, b))

minmax = x+1
ans = (1, x)
for a, b in arr:
    if max(a, b) < minmax and gcd(a, b) == 1:
        minmax = max(a, b)
        ans = (a, b)
print (ans[0], ans[1])
