t = int(input())
from math import sqrt, floor, ceil, gcd

sq1 = floor(sqrt(t))
while t%sq1 != 0:
    sq1 -= 1

sq2 = t//sq1

while gcd(sq1, sq2) > 1:
    sq1 -= 1
    while t%sq1 != 0:
        sq1 -= 1
    sq2 = t//sq1

print(sq1, sq2)



