import math
def lcm(a, b):
    return a*b // math.gcd(a, b)

x = int(input())
l = []
i=1
ed = math.floor(x**(.5))
while(i<=ed):
  if(x%i==0):
    l.append([i,x//i])
  i+=1
mx =max(l[0][0],l[0][1])
l1 = [l[0][0],l[0][1]]
for i in l:
  if(lcm(i[0],i[1])==x):
    if(max(i[0],i[1])<mx):
      l1 = [i[0],i[1]]
print(*l1)
    
  

