import math

m = int(input())
n = int(math.sqrt(m))
l = []
for i in range(1, n+1):
    if m % i == 0:
        tmp = m // i
        if math.gcd(tmp, i) == 1:
            l.append((i, tmp))
l.reverse()
print('{} {}'.format(l[0][0], l[0][1]))