from math import gcd

def divisor(n):
    ret = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            ret.append(i)
            if i*i != n:
                ret.append(n//i)
    return ret

x = int(input())
ans = float("inf")
for ai in divisor(x):
    b = x//ai
    if gcd(ai, b) == 1:
        tmp = max(ai, b)
        ans = min(ans, tmp)
print(x//ans, ans)