7. In a $5 \times 5$ grid, place chess pieces such that each cell contains 1 or 2 pieces, black cells contain black pieces, and white cells contain white pieces. The number of white pieces in each row must be the same, and the number of black pieces in each column must also be the same. There are $\qquad$ different ways to place the pieces. (The board cannot be rotated or flipped)
$527$