def gcd(a,b):
  while b != 0:
    a, b = b, a % b
  return a
x = int(input())
a = []
for i in range(1, int(x**0.5 + 1)):
    if x % i == 0:
        a.append(i)
a.sort(reverse=True)
for i in range(len(a)):
    if gcd(a[i], x // a[i]) == 1:
        print(a[i], x // a[i])
        exit()
