# Ordered pairs that satisfy inequalities

Determine the number of ordered pairs of integers $(p, q)$ for which $p^2 +q^2 < 10$ and $−2^p \le q \le 2^p$.

The answer is $17$, this looks like an easy problem to solve by just counting the number of possibilities, I already got the answer which is $17$, but it took me a long time to get it and it was very tedious. I want to know an easier way of thinking about this problem

I tried using the signs of $p$ and $q$, if they were positive or negative, then I counted it all, it was a real headache just assuming their signs, and some cases had some solutions.

I found these $17$ solutions by assigning values to $p$ and finding possible values for $q$
$$\{(0,0), (0, \pm 1), (1, 0), (1,\pm 1), (1 \pm 2), (-1, 0),(2,0),(2,\pm 1),(2,\pm 2),(-2,0),(\pm 3,0)\}$$