Given integers $a,b$, we say a polynomial $f(x) \in \mathbb{Z}[x]$ is an $(a,b)$-filter, if $f(x)$ splits completely into linear factors modulo an odd prime $p$ only if $p=a \pmod b$. For example $x^2+1$ is a $(1,4)$-filter and $(x^2+1)(x^2+2)$ is a $(1,8)$-filter.
Problem: Determine all pairs $(a,b)$ for which an $(a,b)$-filter exists.