def gcd(x, y):
    if y == 0:
        return x
    else:
        return gcd(y, x%y)

x = int(input())
ans = 1
for i in range(1, int(pow(x, 0.5)+1)):
    if x%i == 0 and gcd(i, x/i) == 1:
        ans = i
print(ans, int(x/ans))