import math
lcm=int(input())
emp=[]
for i in range(1,lcm+1):
    if lcm%i==0:
        emp.append(i)
for i in range(len(emp)-1):
    if (emp[i]*emp[i+1])//(math.gcd(emp[i],emp[i+1]))==lcm:
        print(emp[i],emp[i+1])
        break
