Factoring two-variable quadratics