
def gcd(a, b):
    while b > 0:
        a, b = b, a % b
    return a
def Factor(n):
   Ans = []
   d = 1
   while d * d <= n:
        if n % d == 0:
           Ans.append([d, n//d])
        d += 1
   return Ans
x = int(input())
Ans = Factor(x)
min = Ans[0][1]
minI = 0
for i in range(len(Ans)):
    if Ans[i][1] < min and gcd(Ans[i][0],Ans[i][1]) == 1:
        min = Ans[i][1]
        minI = i
print(str(Ans[minI][0]) + " " + str(Ans[minI][1]));