def gcd(a, b):
    while b:
        a, b = b, a % b
    return a


n = int(input())
k = int(n ** (0.5))
for i in range(k):
    if n % (k - i) == 0 and gcd(k - i, n // (k - i)) == 1:
        print(k - i, n // (k - i))
        break 
