Factoring with the distributive property