Problems
406 - Knight Attack
SUBMIT PROBLEM

Knight Attack

Time Limit: 1 sec

 

The Problem

We like to play chess. We know Knight  have a special movement and it's the only piece that can jump over other pieces. The knight movement can be viewed as an "L". If there are any unlucky person who don’t play chess, try to find out the move of a Knight in chess board by the help of following image.

 

 

In this problem you are given the position of a Knight(K). There are also given the position of another piece(A). Now your job is to find is given piece(A) is attacked by given Knight(K).


Let the position of Knight(K) is (5, 4) as the image. Then it(K) can attack any piece in position (3, 3),    (4, 2), (6, 2), (7, 3), (7, 5), (6, 6), (4, 6) and (3, 5). Now if position of another piece(A) is (7, 5) then A is attacked by K. If the position of A is (1, 1) then A is not attacked by K.

 

The Input

Input file contain a series of line, each line contain four integer denotes K1, K2, A1 and A2 (1<= K1, K2, A1 and A2<=8). Where K1 and K2 denote the position of Knight (K) and A1 and A2 denote the position of another piece(A). Input is terminated by EOF.

 

The Output

For each line of input you should print “A is attacked by K.” if A  is attacked by K else print “A is not attacked by K.”.

 

Sample Input

5 4 4 6

5 4 1 2

5 4 3 3

 

Sample Output

A is attacked by K.

A is not attacked by K.

A is attacked by K.

 

 

 

 

Problem Setter: Hasnayn Ahmed Shakil