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


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

q=int(input())
w=int(math.sqrt(q))
for i in range(w,0,-1):
    if q%i==0 and lcm(i,q//i)==q:
        print(i,q//i)
        break
