from collections import defaultdict,Counter
from math import ceil,floor,log2,gcd
from itertools import permutations,combinations
from functools import reduce
#n,k = map(int,input().split())
#a = sorted(list(map(int,input().split())))
#a = list(map(int,input().split())) 
n = int(input())
def lcm(a, b):
    return abs(a*b) // gcd(a, b)
best = n+1
for x in range(1,int(n**0.5)+1):
    if n%x:
        continue
    elif lcm(x,n//x) == n:
        best = min(best,max(x,n//x))
print (best,n//best)