Weird factorization algorithm.