def GCD(a, b):
    if b == 0:
        return a

    return GCD(b, a % b)


def LCM(a, b):
    return a * b / GCD(a, b)


def solve():
    x = int(input())

    if x == 1:
        numbers = 1, 1
        return " ".join(map(str, numbers))

    for i in range(1, x + 1):
        for j in range(1, x + 1):
            if LCM(i, j) == x:
                numbers = i, j
                return " ".join(map(str, numbers))


if __name__ == '__main__':
    print(solve())
