from math import sqrt
from math import floor


def gcd(a, b):
    while b:
        a, b = b, a % b
    return a


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


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


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


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