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

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

def div(k):
    m=100000000000000
    for i in range(1,math.floor(math.sqrt(k))+1):
        if k%i==0 and lcm(i,k//i)==k:
            m=min(max(k//i,i),m)
    return m
            

n=int(input())
a=div(n)
print(a,n//a)
