from math import gcd
# def gcd(a,b): 
#     if a == 0: 
#         return b 
#     return gcd(b % a, a) 
  
def lcm(a,b): 
    return (a*b) / gcd(a,b) 


n = int(input())
mx=10**12+1
for i in range(1,int(n**(1/2))+1):
    d = n//i
    if lcm(i,d)==n:
        mx = min(mx,max(i,d))
print(n//mx,mx)     