from math import sqrt


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


x = int(input())
x1 = int(sqrt(x))
for i in range(x1, 0, -1):
    if x % i == 0:
        a = i
        b = x // i
        if (a * b) // gcd(a, b) == x:
            print(a, b)
            break
