# -*- coding: utf-8 -*-
"""
Created on Thu Jun  4 13:03:38 2020

@author: Anmol Singla
"""
def gcd(x,y):
    while(y!=0):
        x,y=y,x%y
    return x    
    
from math import sqrt
x=int(input())
n=sqrt(x)
a=1
b=x
for i in range(1,int(n+1)):
    if(x%i==0):
        c=x//i
        if(gcd(c,i)==1):
            if(c%i):
                a=i
                b=c
print(int(a),int(b))
        
    