Re-added prime factorization.