def gcd(a,b):
    if b == 0:
        return a
    else:
        return(gcd(b,a%b))
def lcm(a,b):
    return a*b//gcd(a,b)
def fadi(x):
    ans = []
    d = 2
    while d*d <= x:
        if x%d == 0:
            if lcm(d,x//d) == x:
                ans.append((d,x//d))
        d += 1
    return ans
x = int(input())
y = fadi(x)
if y == []:
    print(1,x)
else:
    final = y[0]
    for obj in y:
        if max(obj) <= max(final):
            final = obj
    print(*final)