from math import gcd
def lcm(a,b):
    return (a*b)//gcd(a,b)
x = int(input())
cura,curb = 1,x
for i in range(1,int(x**0.5)+1):
    if x%i == 0:
        if lcm(i,x//i) == x:
            if max(i,x//i) < max(cura,curb):
                cura,curb = i,x//i
print(cura,curb)
