Graph quadratics in factored form