Multithreaded factorization