a number theory problem regrading grids

The $9$ squares on a $3 × 3$ grid are each marked with a number ($1$to $9$) such that the number of squares marked with $n$ is a multiple of $n$. For example, all $9$ squares can be marked with $9$, or as another example, $3$ squares can be marked with $3$ and $6$ squares with $6$. Suppose two of the $3 × 3$ grids are drawn differently. Prove that that there are necessarily two squares on the grid such that these two squares are marked with the same number on the first grid and these two squares are marked with the same number on the second grid.

So I have approached this problem by first trying to count the total number of ways that two square on the grid can be similar-- I think there are a total of ${9}\choose2$ ways of obtaining 2 squares can be similar. However then I quickly figured out that one of the way to choose two identical square from $3*3$ grid is 10. An example is shown here:

3 3 3

2 2 2

2 1 1

which in total offeres a 6+1+3=10 ways of choosing two simlar squares; however if we multiply it by two we get a number that is quite far away from the total number of ways of choosing the square. However I don't think there is a mistake in the problem so I must have messed up somewhere. Please tell me where did I mess up my logic. Thank you!

locked by Jyrki LahtonenMar 14 '18 at 15:05

This question is locked in view of our policy about contest questions. Questions originating from active contests are locked for the duration of the contest, with answers hidden from view by soft-deletion. Please see the comments below for references to the originating contest.