Let $S$ be the number of ordered pairs of integers $(a,b)$ with $1 \leq a \leq 80$ and $b \geq 0$ such that the polynomial $x^2+ax+b$ can be factored into the product of two (not necessarily distinct) linear factors with integer coefficients. Find the remainder when $S$ is divided by $1000$.
← Back to Problem 789