I have the integer variables $p$ and $q$ such that $p, q \in [0,2]$.
Question.
How to write the set of possible pairs of $p$, $q$ if $p$ and $q$ can take integer values from the range $[0,2]$ and they aren't equal to $0$ together?
Update: I hope, my set is $\{(1,0), (1,1), (1,2), (0,1), (0,2), (2,0),(2,1), (2,2)\}$
My attemp is: $\{(p, q) \in \mathbb N: 0 \le p, q \le 2, p \neq 0 ~\text{and}~ q \neq 0\}$
Your nearly perfect, but the last part ($p \ne 0$ and $q \ne 0$) is slightly incorrect. Really it should say $p + q \ne 0$ because $2 + 0 = 2$ even though in that case, $q$ is $0$.