user: # Task
 An `amazon` (also known as a queen+knight compound) is an imaginary chess piece that can move like a `queen` or a `knight` (or, equivalently, like a `rook`, `bishop`, or `knight`). The diagram below shows all squares which the amazon attacks from e4 (circles represent knight-like moves while crosses correspond to queen-like moves).

 ![](https://codefightsuserpics.s3.amazonaws.com/tasks/amazonCheckmate/img/amazon.png?_tm=1473934566013)

 Recently you've come across a diagram with only three pieces left on the board: a `white amazon`, `white king` and `black king`. 
 
 It's black's move. You don't have time to determine whether the game is over or not, but you'd like to figure it out in your head. 
 
 Unfortunately, the diagram is smudged and you can't see the position of the `black king`, so it looks like you'll have to check them all.

 Given the positions of white pieces on a standard chessboard, determine the number of possible black king's positions such that: 

* It's a checkmate (i.e. black's king is under amazon's 
 attack and it cannot make a valid move);

* It's a check (i.e. black's king is under amazon's attack 
 but it can reach a safe square in one move);

* It's a stalemate (i.e. black's king is on a safe square 
 but it cannot make a valid move);

* Black's king is on a safe square and it can make a valid move.

Note that two kings cannot be placed on two adjacent squares (including two diagonally adjacent ones).

# Example

 For `king = "d3" and amazon = "e4"`, the output should be `[5, 21, 0, 29]`.

 ![](https://codefightsuserpics.s3.amazonaws.com/tasks/amazonCheckmate/img/example1.png?_tm=1473934566299)

 `Red crosses` correspond to the `checkmate` positions, `orange pluses` refer to `checks` and `green circles` denote `safe squares`.

 For `king = "a1" and amazon = "g5"`, the output should be `[0, 29, 1, 29]`.

 ![](https://codefightsuserpics.s3.amazonaws.com/tasks/amazonCheckmate/img/example2.png?_tm=1473934566670)

 `Stalemate` position is marked by a `blue square`.

# Input


 - String `king`

Position of white's king in chess notation.


 - String `amazon`

Position of white's amazon in the same notation.

Constraints: `amazon ≠ king.`

# Output

An array of four integers, each equal to the number of black's king positions corresponding to a specific situation. The integers should be presented in the same order as the situations were described, `i.e. 0 for checkmates, 1 for checks, etc`.

Answer: {"fn_name": "amazon_check_mate", "inputs": [["a1", "g5"], ["a3", "e4"], ["f3", "f2"], ["b7", "a8"], ["f7", "d3"], ["g2", "c3"], ["f3", "c1"], ["d4", "h8"], ["h6", "a7"], ["a6", "g3"], ["e1", "b4"], ["f4", "c4"], ["c3", "e8"], ["b5", "e5"], ["c8", "g8"], ["a6", "b5"], ["b3", "e2"], ["b7", "c3"], ["b5", "b3"], ["a4", "a6"], ["h2", "a5"], ["b7", "c1"], ["e6", "e7"], ["a2", "c6"], ["a6", "e1"], ["e8", "g7"], ["f5", "f7"], ["h3", "d8"], ["b1", "f8"], ["c7", "a2"], ["f1", "a5"], ["g6", "f3"], ["g2", "c6"], ["d1", "e1"], ["h6", "b5"], ["e4", "e8"], ["b6", "d5"], ["b4", "h8"], ["e5", "b4"], ["g1", "g6"], ["a3", "a5"], ["g4", "g3"], ["c4", "e7"], ["d3", "a3"], ["a2", "e6"], ["f2", "f3"], ["g4", "b4"], ["a5", "g2"], ["b7", "b4"], ["a4", "a7"], ["h7", "a8"], ["a7", "d7"], ["e4", "a6"], ["e2", "g1"], ["e7", "b2"], ["e5", "f6"], ["b8", "b2"], ["c7", "e8"], ["e7", "e5"], ["a5", "b4"], ["d4", "e8"], ["g7", "h3"], ["a3", "b5"], ["f5", "e7"], ["d3", "b7"], ["h1", "e8"], ["g6", "g1"], ["e6", "c8"], ["c5", "c8"], ["f4", "b1"], ["g3", "b8"], ["e2", "a3"], ["c3", "c6"], ["f1", "c7"], ["a5", "e1"], ["b7", "g8"], ["g5", "e8"], ["e4", "f2"], ["b1", "a4"], ["h3", "e4"], ["g6", "b2"], ["a7", "c2"], ["e2", "f8"], ["h5", "d1"], ["h1", "f3"], ["e5", "f2"], ["f2", "a7"], ["e4", "g5"], ["d6", "b3"], ["g4", "a4"], ["a5", "d6"], ["a8", "d6"], ["a6", "h1"], ["f4", "c8"], ["d4", "g3"], ["e7", "a8"], ["g3", "c8"], ["b2", "h2"], ["a3", "h1"], ["g6", "e8"], ["e7", "d3"], ["f4", "g6"], ["h2", "d6"], ["a8", "e5"], ["c4", "d8"], ["c4", "b6"], ["d4", "a6"], ["c6", "d8"]], "outputs": [[[0, 29, 1, 29]], [[1, 32, 1, 23]], [[6, 11, 0, 38]], [[0, 10, 0, 45]], [[4, 28, 1, 21]], [[9, 21, 0, 24]], [[4, 18, 0, 32]], [[0, 18, 0, 36]], [[0, 22, 0, 35]], [[3, 26, 1, 27]], [[0, 27, 2, 28]], [[3, 24, 0, 27]], [[0, 25, 0, 29]], [[0, 30, 0, 24]], [[1, 19, 0, 37]], [[5, 19, 1, 33]], [[0, 24, 1, 29]], [[9, 21, 0, 24]], [[3, 17, 0, 34]], [[2, 16, 0, 39]], [[0, 25, 0, 32]], [[2, 20, 0, 32]], [[3, 14, 1, 37]], [[9, 24, 0, 24]], [[0, 24, 0, 33]], [[0, 22, 0, 35]], [[3, 16, 0, 35]], [[0, 24, 0, 33]], [[2, 23, 0, 32]], [[2, 22, 0, 30]], [[0, 24, 0, 33]], [[7, 21, 0, 26]], [[7, 23, 0, 24]], [[2, 16, 0, 40]], [[0, 27, 1, 29]], [[1, 19, 0, 34]], [[0, 28, 0, 26]], [[0, 22, 0, 32]], [[0, 24, 1, 29]], [[3, 24, 1, 29]], [[0, 19, 0, 38]], [[6, 12, 0, 37]], [[0, 26, 1, 27]], [[2, 15, 0, 37]], [[3, 28, 0, 26]], [[7, 18, 0, 30]], [[0, 26, 1, 27]], [[0, 27, 0, 30]], [[0, 24, 1, 29]], [[0, 18, 0, 39]], [[0, 21, 0, 36]], [[0, 25, 0, 32]], [[3, 21, 0, 30]], [[0, 17, 0, 37]], [[0, 26, 0, 28]], [[12, 10, 0, 33]], [[0, 25, 0, 32]], [[0, 18, 0, 36]], [[0, 28, 0, 26]], [[5, 19, 1, 33]], [[1, 21, 0, 32]], [[4, 18, 0, 32]], [[0, 24, 2, 31]], [[0, 22, 1, 31]], [[1, 25, 0, 28]], [[0, 25, 0, 34]], [[0, 20, 1, 33]], [[3, 15, 0, 36]], [[2, 15, 0, 37]], [[0, 22, 0, 32]], [[0, 21, 0, 33]], [[4, 18, 0, 32]], [[7, 20, 0, 27]], [[3, 26, 1, 27]], [[0, 23, 0, 34]], [[0, 21, 0, 33]], [[0, 22, 1, 31]], [[3, 19, 0, 32]], [[0, 21, 0, 36]], [[0, 31, 0, 26]], [[0, 25, 0, 29]], [[3, 26, 0, 28]], [[2, 20, 0, 32]], [[0, 23, 0, 34]], [[4, 25, 0, 30]], [[3, 21, 0, 30]], [[0, 21, 0, 33]], [[0, 22, 1, 31]], [[3, 23, 0, 28]], [[0, 22, 0, 32]], [[3, 26, 0, 28]], [[3, 28, 0, 28]], [[0, 22, 0, 35]], [[2, 21, 0, 31]], [[3, 21, 0, 30]], [[2, 18, 0, 34]], [[2, 21, 0, 31]], [[0, 21, 0, 33]], [[1, 22, 0, 34]], [[2, 18, 0, 34]], [[4, 26, 0, 24]], [[3, 19, 0, 32]], [[3, 28, 0, 26]], [[0, 34, 0, 25]], [[1, 21, 0, 32]], [[3, 19, 0, 32]], [[2, 20, 0, 32]], [[0, 18, 0, 36]]]}