from math import sqrt

n = int(input())
if n==1:
    print(1,1)
else:
    m = n
    a,b=1,n

    for i in range(2,int(sqrt(n))+1):
        if i*i!=n:
            if max(i,int(n/i))<m:
                m=max(i,int(n/i))
                a,b = i,int(n/i)

    print(a,b)
