#!/bin/python3

import math
import os
import random
import re
import sys

# Complete the lilysHomework function below.
def search (arr1,target):
    lo = 0
    hi = len(arr1)-1
    while (lo<hi):
        mid = lo+(hi-lo)//2
        if (arr1[mid]>=target):
            hi = mid
        else:
            lo = mid+1
    return lo
def minPairLCM(x):
    if (x==1):
        return (1,1)
    divisors = []
    i = 1
    while(i<=x):
        if (x % i==0):
            divisors+=[i]
        i+=1
    n = len(divisors)
    mid = n//2
    i = mid
    while (i<=x):
        p = divisors[search(divisors,x/divisors[i])]
        if (p!=divisors[i]):
            return (p,divisors[i])
        i+=1
    
x = int(input())
(a,b) = minPairLCM(x)
print(a,end=" ")
print(b)

