import math
import bisect
from collections import Counter,defaultdict
from sys import stdin, stdout
input = stdin.readline
I =lambda:int(input())
M =lambda:map(int,input().split())
LI=lambda:list(map(int,input().split()))
n=I()
ans=1;ans1=n
for i in range(2,int(math.sqrt(n))+1):
    if n%i==0 and max(i,n//i)<ans1 and (i*(n//i))//(math.gcd(i,n//i))==n:
        ans=i;ans1=n//i 
print(ans,ans1)

