a = int(input())
q = round(a**(1/2))
if q**2 > a:
    q=q-1

def nod(a,b):
    while a != 0 and b != 0:
        if a > b:
            a %= b
        else:
            b %= a
    return a+b

while q > 0:
    if a % q ==0:
        p = a // q
        if p*q//nod(p,q) == a:
            print(q, p)
            break
    q = q-1