def gcd(a,b):
    if b == 0:
        return a
    else:
        return gcd(b, a%b)
n = int(input())
for i in range(int(n**0.5)+1, 0, -1):
    if n%i == 0:
        if gcd(n//i, i) == 1:
            ans = sorted([n//i, i])
            break
print(*ans)