import math
def divisors(n) :
    i = 1
    l=list()
    while i <= math.sqrt(n):
        if (n % i==0) :
            l.append(i)
        i = i + 1
    return l

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())
div=divisors(n)
# print(div)
for i in range(len(div)-1,-1,-1):
    if(lcm(div[i],n//div[i])==n):
        print(str(div[i]) + " " + str(n//div[i]))
        break
