Distinct degree factorization