import math
def compute_gcd(x, y):
   while(y):
       x, y = y, x % y
   return x

def compute_lcm(x, y):
   lcm = (x*y)//compute_gcd(x,y)
   return lcm

el = int(input())
square_root = math.ceil(math.sqrt(el))
a = 1
b = el
for i in range(1, square_root + 1):
    if el%i == 0:
        if compute_lcm(i, int(el/i)) == el:
            a = i
            b = int(el/i)
print(a, b)
