Yi is an avid chess player. He would like to know how many ways it is possible to place queens on an chessboard such that no queen is in an attacking position.
The queen can move diagonally, horizontally and vertically, thus combining the properties of a bishop and a rook. Two queens are in the attacking positions if they are on the path of each other.
Input Specification
The first line will contain two integers .
Output Specification
The number of ways to place queens on an chessboard such that no queens are in an attacking position.
Sample Input 1
3 2
Sample Output 1
8
Sample Input 2
4 4
Sample Output 2
2
Comments