PASCAL 2016 Problem 25

A 0 or 1 is to be placed in each of the nine 1\times1 squares in the 3\times3 grid shown so that each row contains at least one 0 and at least one 1, and each column contains at least one 0 and at least one 1. The number of ways in which this can be done is

Image

Answer Choices
A. 126
B. 120
C. 138
D. 102
E. 96

Image