import math

x = int(input())

p = []

for i in range(1, int(x**0.5)+1):
    if x%i == 0:
        if i*x//i/(math.gcd(i, x//i)) == x:
            p = [i, x//i]
            
print(" ".join(map(str, p)))