from sys import stdin
input = stdin.buffer.readline

t = int(input())
ot =t
mx = t

i = 2
prim = []
while i*i <= t:
    now = 1
    while t and t%i == 0:
        t //= i
        now = now*i
    if now != 1:
        prim.append(now)
    i += 1

if t:
    prim.append(t)

can = [1]
for i in prim:
    nw = []
    for x in can:
        nw.append(x*i)
        mx = min(mx, max(x*i, ot//(x*i)))
    can.extend(nw)

print(mx, ot//mx)


