x = int(input())
c = x

def gcd(a, b):
    if a == 0:
        return b
    else:
        return gcd(b%a, a)

for i in range(1, int(x**0.5)+1):
    if x%i == 0:
        a = i
        b = x//i
        if gcd(a, b) == 1:
            t = max(a, b)
            if t < c:
                c = t

print(c, x//c)

