## Task 2.

Determine all natural numbers $m$ and $n$ for which it is possible to color a rectangular tile with $m$ rows and $n$ columns such that the following three conditions are satisfied:

- in each row, the number of black fields is equal to the number of white fields;
- if a column and a row intersect at a white field, then that column and row have the same number of white fields;
- if a column and a row intersect at a black field, then that column and row have the same number of black fields.
## Solution.

Since the number of black and white fields in each row is equal, $n$ must be even, and we write $n=2k$.

Consider the first column. If there are no white fields in this column, then $m$ must be equal to $k$ because all fields are black and there must be as many as there are in each row. Similarly, if there are no black fields in this column, then $m=k$.

One example that shows any pair of the form $(m, n)=(k, 2k)$ satisfies all conditions can be created by coloring all fields in the first $k$ columns black, and all fields in the last $k$ columns white.

Assume that in the first column there is at least one black and at least one white field. Then in this column there must be exactly $k$ black and exactly $k$ white fields, so $m=2k$.

That a pair of the form $(m, n)=(2k, 2k)$ satisfies all conditions for any natural number $k$ can be seen, for example, by coloring the board in a checkerboard pattern or by dividing the board into four $k \times k$ squares, and coloring all fields in the upper-left and lower-right squares black, and the rest white.