n=input()
from functools import reduce
from bisect import bisect_left
l=list(reduce(list.__add__,([i, n//i] for i in range(1, int(n**0.5) + 1) if n % i == 0)))
l.sort()
if len(l)==2:
    print 1,n
else:
    a=bisect_left(l,int(n**0.5)+1)
    l1=[n]
    for i in range(a,0,-1):
        if max(l[i],n/l[i])%min(l[i],n/l[i])<>0 :
            l1.append(max(l[i],n/l[i]))
    print min(l1),n/min(l1)
