p=[2,3,5,7,11,13,17,19,23,29,31]
def cop(a,b):
    for q in p:
        if a%q==0 and b%q==0:
            return False
    return True
import math
x=int(input())
max=-1
i=2
s=(math.sqrt(x))
while i<=s:
    if x%i==0 and cop(i,x//i):
        max=i
    i+=1
if max == -1:
    print(1, x)
else:
    print(max, x//max)