import math
def lcm(a,b):
    return (a*b)//math.gcd(a,b)

x=int(input())
minl=x
min2=1
for i in range(2,int(x**0.5)+1):
    a=i
    b=x//i
    if lcm(a,b)==x:
        if max(a,b)<minl:
            minl=max(a,b)
            min2=min(a,b)
print(min2,minl)
