The Lambert series factorization theorem