def hcfnaive(a,b): 
    if(b==0): 
        return a 
    else: 
        return hcfnaive(b,a%b) 

def lcm(a,b):
    return (a*b)//hcfnaive(a,b)
    
x=int(input())
fac=x
for i in range(2,int(x**(0.5))+1):
    if x%i==0 and lcm(i,x//i)==x:
        fac=min(fac,x//i)
print(x//fac,fac)