# maa chudaaye duniya
from sys import stdin, stdout
from math import gcd, sqrt
def lcm(a, b):
    return a // gcd(a, b) * b

x = int(stdin.readline().strip())
cntr = 1
ans = 0
while cntr <= sqrt(x) + 1:
    if x%cntr == 0 and lcm(cntr, x//cntr) == x:
        ans = cntr
    cntr += 1
stdout.write('{} {}\n'.format(ans, x//ans))
