Woburn Team Practice '07
The Head Monkey has decided to give the monkeys some recreation time
since they've been working so hard lately. She introduces them to a
two-player game called the Drain Game. The game is played on an
grid of unit squares, with
an odd integer. The
square at the center of the grid (this is well defined, as
is odd)
is designated the drain. A single marker is placed on the grid at
, where
are
-based
indices.
Players alternate turns. At each turn, a player can move the marker any
number of squares horizontally, vertically, or diagonally under the
constraint that the Manhattan distance between the new location and the
drain is strictly smaller than the Manhattan distance between the
current location and the drain. In other words, you must move the marker
"towards" the drain. Recall that the Manhattan distance between the
pairs and
is simply
. The player to
move the marker into the drain wins.
You are playing against the Head Monkey. It's your turn, and the marker
is currently located at . Can you win?
Input Specification
The first line of the input file contains a single integer
, indicating the number of test cases to follow.
Each test case is a single line listing the three integers ,
, and
.
Output Specification
Output the following for each test case:
A single line containing the word YES
(if you can win) or NO
(otherwise).
Sample Input
3
5 4 3
5 2 3
55 48 9
Sample Output
NO
YES
YES
Comments