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

def lcm(a,b): 
    return (a*b) / gcd(a,b) 
    
a = int(input())
max1 = 1
for i in range(1, int(a**0.5)+1):
    if a%i==0 and lcm(i, a//i)==a:
        max1 = i
print(max1, int(a//max1))