CPython lite logoProblemsContests

H. ChessXYZ Upsolve

There is a long chessboard with the following types of chess pieces:

  • 1 king
  • 7 queens
  • 4 rooks
  • 6 bishops
  • 8 knights

there must be at least one rook to each side (not necessarily immediately adjacent) of the king. Half of the bishops should be placed in the white squares and the other half in the black squares. Find the number of such placements


Output

Submit the answer.