import math
from decimal import *
import random

def facts(n):
    ans = [1, n]
    for i in range(2, int(math.sqrt(n))+2):
        if(n%i==0):
            ans.append(i)
            ans.append(n//i)
    return sorted(ans)

x = int(input())
fs = facts(x)
n = len(fs)-1
a,b =1, x
for i in range(len(fs)//2):
    if(math.gcd(fs[n-i],fs[i])==1):
        a,b = fs[i],fs[n-i]
print(a,b)
