a=int(input())
from math import gcd

# This function computes LCM
def compute_lcm(x, y):
   lcm = (x*y)//gcd(x,y)
   return lcm
for i in range(int(a**(1/2)),0,-1):
    if a%i==0 and compute_lcm(i,a//i)==a:
        print(i,a//i)
        break
else:
    print(1,a)
