import math
x = int(input())
y = math.sqrt(x)
a = [1]

for i in range(2,int(y)+1):
    if x%i == 0:
        a.append(i)
a.reverse()
for i in range(len(a)):
    if math.gcd(a[i],x//a[i]) ==1:
        print(a[i],x//a[i])
        break
    
            
    