import math
x = int(input())
l = []
for i in range(1, int(math.sqrt(x)) + 1):
    if x % i == 0:
        l.append(i)
d = []
for j in l:
    if math.gcd(j, x // j) == 1:
        d.append(j)
print(d[len(d) - 1], x // d[len(d) - 1])
