def gcd(a,b):
    k = a % b
    while (k):
        a = b
        b = k
        k = a % b
    return b
x = int(input())
ans = 1000000000000
for i in range(1,int(x ** 0.5) + 1):
    if (x % i == 0):
        a = i
        b = x // i
        if (gcd(a,b) == 1):
            ans = min(ans,b)
print(x // ans,int(ans))