from math import floor, sqrt


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


def lcm(a, b):
    return (a * b) // gcd(a, b)


def main():
    x = int(input())
    m = floor(sqrt(x))
    for i in range(m+1, 0, -1):
        if lcm(x//i, i) == x:
            print(f"{x//i} {i}")
            break


if __name__ == '__main__':
    main()
