from math import floor

a = int(input())
lista = []
for i in range(2, int(a**2**-1)+1):
    if a % i == 0 and a // i % i != 0:
        lista.append([i, a//i])

if len(lista) != 0:
    lista.sort(key=max)
    print(lista[0][0], lista[0][1])
else:
    print(1, a)
