# Why do we fall ? So we can learn to pick ourselves up.
from math import gcd
def l(a,b):
    return (a*b)//gcd(a,b)
def solve():
    x = int(input())
    ansx, ansy = 1, x
    for i in range(1, int(x ** 0.5) + 1):
        if x % i == 0:
            if l(i, x // i) == x:
                if max(i, x // i) < max(ansx, ansy):
                    ansx, ansy = i, x // i
    print(ansx, ansy)
solve()