import sys, itertools, math

X = int(sys.stdin.readline())

best = X
ba = 0
bb = 0
for a in range(1, int(math.sqrt(X))+1):
  if X % a == 0:
    b = X // a
    if b < a:
      break
    if (a*b)//math.gcd(a, b) == X:
      if max(a, b) <= best:
        ba, bb = a, b
        best = max(a, b)

print(ba, bb)