import math

x = int(input())

l = list()

for i in range(1,int(x**0.5)+1):
    if x%i==0 :
        if i!=x//i:
            l.append(i)
            l.append(x//i)
        else:
            l.append(i)

l.sort()

minans = 10000000000000000000000000000000000000000000000000

a = 0
b = 0


for i in l:
    if math.gcd(i,x//i)==1 and minans>max(i,x//i):
        minans = max(i,x//i)
        a = i
        b = x//i

print(a,b)
