List comprehension for 7x7 board I have a 7x7 board and I want to select some elements from it. The elements I want to select are marked o, the other ones are marked x.

Here is the board:

xoxoxox
ooooooo
xooooox
ooooooo
xooooox
ooooooo
xoxoxox


I use indexing starting from 1. The point (1,1) is the top left.

The current list comprehension I have to select the o-elements is the following:

[(r,c) | r&lt;-[1..7], c&lt;-[1..7],
         (not (even r) &amp;&amp; not (even c) &amp;&amp; r/=1 &amp;&amp; r/=7 &amp;&amp; c/=1 &amp;&amp; c/=7) 
         || even r
         || even c]


I am wondering if I can make this list comprehension more simple. The code above is in Haskell, however, pseudo-code or Python list comprehensions are also fine with me.
Since 7 is prime, the following pseudo code works, although it involves some “thinking around the corner”.

[(r,c) | r&lt;-[1..7], c&lt;-[1..7], r * c not in [1, 3, 5, 7, 21, 35, 49]]


A more straightforward way would be

(r /= 1 &amp;&amp; r /= 7 &amp;&amp; c /= 1 &amp;&amp; c /= 7) || even r || even c