n = int(input())
arr =[1]
i = 1
def gcd(a,b):
    if b == 0:
        return a
    else:
        return(gcd(b,a%b))
ans_a,ans_b=1,1
while i*i < n:
    if n%i==0:
        a = i
        b = n//i
        if gcd(a,b)==1:
            ans_a,ans_b = a, b
    i+=1
print(ans_a,ans_b)