def primeFactors(n): 
    cnt=0
    if n%2==0:
      cnt+=1
    while n % 2 == 0: 
        n = n / 2
    for i in range(3, int(math.sqrt(n))+1, 2): 
        if n%i==0:
          if cnt==1:
            return 0
        while n % i == 0: 
            n = n / i 
        cnt+=1
    if n > 2: 
      if cnt==1:
        return 0
    return 1
import math
n=int(input())
i=2
a=1
b=n
if n==1:
  print(1,1)
else:
  if(primeFactors(n)==0):
    while(True):
      if(n%i==0):
        if math.gcd(n//i,i)==1:
          if n//i == a and i == b:
            print(a,b)
            break
          a=i
          b=n//i
      i+=1
  else:
    print(1,n)