import math
n = int(input())
c = int(n**(0.5))
l = []
def lcm(x, y):
    return x * y // math.gcd(x, y)
for i in range(1,c+1):
    if n%i == 0:
        l.append(max(i,n//i))
l.sort()
for i in l:
    x = lcm(i,n//i)
    if x == n:
        print(n//i,i)
        break
    
    

        
