We are given 16 teacups, four each in each of four colours, and, similarly, 16 saucers. Arrange the cups on top of the saucers in a 4 by 4 square grid so that:
in each row and column, there is one cup of each colour;
in each row and column, there is one saucer of each colour;
(Orthogonality Condition) no cup-saucer colour combination is repeated. (To be clear, this means that, for example, red-on-green and green-on-red are both allowed.)
In how many ways can you arrange the teacups?
Note: A computer may be necessary but you must use reasoning too, to help you program it.