def gcd(a, b):
    while a*b != 0:
        if a > b:
            a %= b
        else:
            b %= a
    return a+b

def lcm(a, b):
    return a * b // gcd(a,b)

x = int(input())
ans = x
i = 1
while i**2 <= x:
    if x % i == 0:
        j = x // i
        if lcm(i, j) == x and j < ans:
            ans = j
    i+=1

print(ans, x // ans)