Let $S$ be the number of ordered pairs of integers $(a,b)$ with $1\leq a\leq100$ and $b\geq0$ 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$.