def g(n):
    i = 2
    while i**2 <= n:
        if n%i == 0:
            return i, n//i
        i += 1
    return 1, n

f = lambda a: "{0:d} {1:d}".format(a[0],a[1])

print(f(g(int(input()))))