from functools import reduce
import math
x=int(input())
def lcm(a,b): 
    return (a*b) /( math.gcd(a,b) )
def fs(n):    
    return set(reduce(list.__add__, 
                ([i, n//i] for i in range(1, int(n**0.5) + 1) if n % i == 0)))
lof=list(fs(x))
mn=x
for i in range(len(lof)):
    a=lof[i]
    b=x//a
    if lcm(a,b)==x:
        mn=min(max(a,b),mn)
print(mn,x//mn)