from collections import defaultdict as dd
from math import sqrt,gcd
#l=list(map(int,I().split()))
import sys
input=sys.stdin.readline
I=input
n=int(input())
nn=n
n=int(sqrt(n))
a=nn
b=nn
for i in range(1,n+1):
    if(nn%i==0):
        aa=min(i,nn//i)
        bb=max(i,nn//i)

    if(bb<b and gcd(aa,bb)==1):
        a=aa
        b=bb
print(a,b)
