from math import sqrt
from math import floor


def factorize(n):
    i = floor(sqrt(n))
    if i == n//i: i -= 1
    while n % i != 0: i -= 1
    return (i, n//i)


def solver():
    n = int(input())
    if n == 4: return tuple((1, 4))
    return factorize(n) if n != 1 else tuple((1, 1))


t = solver()
print(t[0], t[1])