import math


def gcd(a, b):
    if (b == 0):
        return a
    return gcd(b, a % b)


n = int(input())
p = int(math.sqrt(n))
j=p
while(j>=1):
    if n % j == 0:
        if gcd(j, n // j) == 1:
            print(j, n//j)
            break
    j+=-1