from math import gcd
from sys import stdin


def main():
    input = lambda: stdin.readline()[:-1]
    X = int(input())

    lcm = lambda x, y: x * y // gcd(x, y)
    n = int(X ** 0.5)
    for a in range(n, 0, -1):
        b, mod = divmod(X, a)
        if not mod and lcm(a, b) == X:
            print(*sorted([a, b]))
            break


main()
