import math
# def hcf(a,b):
#     if (a == b): 
#         return a 
  
#     # a is greater 
#     if (a > b): 
#         return hcf(a-b, b) 
#     return hcf(a, b-a) 

x = int(input())
a = 10**6
aa = []
bb = []
maxofab = []
while a>=1:
    if x%a == 0:
        b = x//a
        if math.gcd(a,b) == 1:
            lcm = x
            aa.append(a)
            bb.append(b)
            maxofab.append(max(a,b))
    a -=1
m = min(maxofab)
ind = maxofab.index(m)
print(aa[ind],bb[ind])