12. Fill a $4 \times 4$ table with 16 numbers: 4 ones, 4 twos, 4 threes, and 4 fours, such that each row and each column contains exactly two even numbers. There are $\qquad$ ways to do this.
First, determine the positions of the even numbers. There are $C_{4}^{2}$ ways to choose two even numbers in the first row. Next, consider the columns where these two even numbers are located; each column still needs to fill one more even number, denoted as $a, b$.
(1) If $a, b$ are in the same row, there are 3 ways to choose their positions, and at this point, the positions of the remaining four even numbers are uniquely determined;
(2) If $a, b$ are in different rows, there are 6 ways to choose their positions, and at this point, the positions of the remaining four even numbers have 2 ways to be chosen. Therefore, the different positions of the even numbers are $C_{4}^{2}(3+6 \cdot 2)=90$.
Thus, the total number of ways to fill the grid is $90 C_{8}^{4} \cdot C_{8}^{4}=441000$.