def gcd(a,b):
    if a == 0:
        return b
    return gcd(b % a, a)
# Function to return LCM of two numbers
def lcm(a,b):
    return (a*b) / gcd(a,b)
n=int(input())
ans=n
for i in range(1,int(n**0.5)+1):
    if n%i==0 and lcm(i,int(n/i))==n:
        temp=max(i,int(n/i))
        if temp<ans:
            ans=temp
print(ans, int(n/ans))
