def lcm():
    x = int(input())
    values = (10**12,10**12)
    for i in range(1, int(x**0.5)+1):
        if x % i == 0:
            p_max = max(i, x//i)
            if p_max < max(values) and i!=x//i:
                values = (i, x//i)
    print(*values)
lcm()