def factor_partial(N):
    R = int(sqrt(float(N)))
sieve = [1, 1] + [0] * (R - 1)
for i in range(2, R):
    if sieve[i] == 0:
        j = i * i
while j <= R:
    sieve[j] = 1
j = j + i
primes = [i for i in range(R + 1) if sieve[i] == 0]
saveN = N
primepower_divisors = []
for i in primes:
    if N % i == 0:
        term = 1
while N % i == 0:
    term = term * i
N = N / i
primepower_divisors = primepower_divisors + [term]
if N == 1:
    break
largecoprime_divisors = [1]
for i in primepower_divisors:
    for j in largecoprime_divisors:
        largecoprime_divisors = largecoprime_divisors + [i * j]
F = min([i for i in largecoprime_divisors if i > R])
return F, saveN / F
Find the largest divisor of N that is less than sqrt(N)