
Ceobe is a curious girl, but it is really hard to determine the IQ of this cute Perro girl, whether she is a hidden genious or just a normal glutton is up to you.
So the task Doctor gave her is to count how many ways can she put $M$ queens inside a $N \times N$ chessboard so that no two queens attack each other. In the game of chess, the queen can attack freely diagonally, horizontally and vertically.

Ofcourse Ceobe will struggle with this complex of a question, so Doctor gave her some hint:

Image credit: Arknights Official youtube channel
The input will consist of 1 line containing 2 numbers:
Testcase 5-6: $M \neq N$
Count how many ways to put $M$ queens inside a $N \times N$ chessboard.