import math

def lcm(a,b):
    m = a*b
    while a != 0 and b != 0:
        if a > b:
            a %= b
        else:
            b %= a
    return m // (a+b)

n = int(input())
sm = 10**12 + 1

a,b = 1, n

for i in range(1, int(math.sqrt(n)) + 100):
    if n % i == 0 and (n//i) % i != 0:
        if max(n//i, i) < sm and lcm(n//i, i) == n:
            sm = max(n//i, i)
            a,b = n//i, i

print(a, b)
