from collections import defaultdict as dc
from collections import deque as dq
import bisect
import sys
import math
#define of c++ as inl=input()
mod=10**9 +7
'''def bs(a,x):
    i=bisect_left(a,x)
    if i!=len(a):
        return i
    else:
        return len(a)
def binarysearchforsolvingeqautions(a,i,l,r):
    while(1):
        mid=(l+r)/2
        p,q=force(a,mid,i)
        if abs(p-q)<0.0000000000001:
            return mid
        elif p>q:
            l=mid
        else:
            r=mid'''
def bs(z,x,n):
    l=0
    r=len(z)-1
    ans=-1
    mk=n
    while(l<r):
        mid=(l+r)//2
        if lcm(z[mid],x,n):
            if mk>max(z[mid],x):
                mk=max(z[mid],x)
                ans=z[mid]
            r=mid-1
        else:
            l=mid+1
    return ans
def digit(n):
    a=[]
    while(n>0):
        a.append(n%10)
        n=n//10
    return a
def inp():
    p=int(input())
    return p
def line():
    p=list(map(int,input().split()))
    return p
def lcm(a,b,n):
    return n==((a*b)/math.gcd(a,b))
n=inp()
ans=n
a=1
b=n
z=[]
for i in range(1,int(pow(n,0.5))+1):
    if(n%i==0):
        p=i
        q=n//i
        z.append(p)
        z.append(q)
z.sort()
ans=n
#print(len(z))
for i in range(len(z)):
    kl=bs(z,z[i],n)
    p=z[i]
    q=n//z[i]
    if lcm(p,q,n) and max(p,q)<ans:
        ans=max(p,q)
        a=p
        b=q
    if kl!=-1 and max(kl,z[i])<ans:
        a=kl
        b=z[i]
        break
print(a,b)
