from collections import Counter
from collections import defaultdict
import math
from sys import maxsize 
  
# Function to find the maximum contiguous subarray 
# and print its starting and end index 
n=int(input())
f=0
for i in range(int(pow(n,.5)),0,-1):
    if(n%i==0 and math.gcd(n//i,i)==1):
        print(n//i,i)
        f=1
        break
if(f==0):
    print(1,n)