from math import gcd

x = int(input())
sqrt = x**.5
for i in range(int(sqrt), 0, -1):
    if x / i == int(x / i):
        if gcd(i, x // i) == 1:
            print(min(i, x // i), max(i, x // i))
            break