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

n = int(input())
import math
b = []
for i in range(1,math.ceil(n**(0.5))+1):
    if(i*(n//i)==n):
        b.append([i,n//i])
l = float("inf")
for i in b:
    k = gcd(i[0],i[1])
    if (i[0]*i[1])//k==n:
        if max(i)<l:
            t=i
            l = max(i)
print(*t)
