n = int(input())
import math
rem = 1
def gcd(a,b): 
    if a == 0: 
        return b 
    return gcd(b % a, a) 

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

for i in range(2,math.ceil(math.sqrt(n))):
    if(n%i==0):
        if(lcm(n//i,i)==n):
            rem = i
print(rem,n//rem)