from math import sqrt

def min(a,b):
    return (b,a)[a<b]
def max(a,b):
    return (b,a)[a>b]

def maxList(L):
    max=L[0]
    for i in L:
        if i>max:
            max=i
    return max
def minList(L):
    min=L[0]
    for i in L:
        if i<min:
            min=i
    return min

def isPrim(x):
    flag=True
    N=int(sqrt(x))
    for i in range(2,N+1):
        if not x%i:
            flag=False
            break
    if x==2:
        flag=True
    return flag
def PrimList(N):
    L=[]
    for i in range(2,N+1):
        if isPrim(i):
            L+=[i]
    return L

def checkIN(a,L):
    flag=False
    for i in L:
        if a in L:
            flag=True
            break
    return flag

def PGCD(a,b):
    div_a=[]
    div_b=[]
    for i in range(1,a+1):
        if a%i==0:
            div_a+=[i]
    for i in range(1,b+1):
        if b%i==0:
            div_b+=[i]
    for i in div_a:
        if checkIN(i,div_b):
            maxInter=i
    return maxInter

def LCM(a,b):
    multi_a=[]
    multi_b=[]
    for i in range(1,b+1):
        multi_a+=[a*i]
    for j in range(1,a+1):
        multi_b+=[b*j]
    for i in multi_a:
        for j in multi_b:
            if i==j:
                return i

def listDiv(d):
    L=[]
    for i in range(1,d+1):
        if not d%i:
            L+=[i]
    return L

def MainProb(d):
    t=[1,d]
    L=listDiv(d)
    counterL=0
    for i in L:
        counterL+=1
    for i in range(0,counterL-1):
        for j in range(i+1,counterL):
            if i*j==d and j<t[1]:
                t=[i,j]
    return t
d=int(input())
Res=MainProb(d)
print(Res[0],Res[1])