Quadratics and polynomial long division