The numbers
2,3,4,5,6,7,8 are to be placed, one per square, in the diagram shown below such that the sum of the four numbers in the horizontal row equals
21 and the sum of the four numbers in the vertical column also equals
21. Then the number of different ways to do this is