import sys
from math import sqrt, ceil

X = int(sys.stdin.readline())

def gcd(a,b):
    if a>b:
        return gcd(b,a)
    if a==0:
        return b
    return gcd(b%a, a)

for i in range(int(ceil(sqrt(X))), 0, -1):
    if X%i == 0 and gcd(i, X//i) == 1:
        bot = min(X//i, i)
        top = max(X//i, i)
        print("%d %d"%(bot, top))
        break
