from math import sqrt, gcd

N = int(input())
sN = int(sqrt(N))
#print(sN)

for i in range(sN):
    sNmi = sN - i
    #print(sNmi, N % sNmi)
    if N % sNmi:
        continue
    second = N // sNmi
    if gcd(sNmi, second) == 1:
        print(sNmi, second)
        break
