---
category_name: easy
problem_code: CRAWA
problem_name: 'The Leaking Robot'
languages_supported:
- ADA
- ASM
- BASH
- BF
- C
- 'C99 strict'
- CAML
- CLOJ
- CLPS
- 'CPP 4.3.2'
- 'CPP 4.9.2'
- CPP14
- CS2
- D
- ERL
- FORT
- FS
- GO
- HASK
- ICK
- ICON
- JAVA
- JS
- 'LISP clisp'
- 'LISP sbcl'
- LUA
- NEM
- NICE
- NODEJS
- 'PAS fpc'
- 'PAS gpc'
- PERL
- PERL6
- PHP
- PIKE
- PRLG
- PYTH
- 'PYTH 3.4'
- RUBY
- SCALA
- 'SCM guile'
- 'SCM qobi'
- ST
- TCL
- TEXT
- WSPC
max_timelimit: '3'
source_sizelimit: '50000'
problem_author: 'witalij_hq '
problem_tester: null
date_added: 25-04-2014
tags:
- ad
- aug14
- easy
- witalij_hq
editorial_url: 'http://discuss.codechef.com/problems/CRAWA'
time:
view_start_date: 1407749400
submit_start_date: 1407749400
visible_start_date: 1407749400
end_date: 1735669800
current: 1493558134
layout: problem
---
All submissions for this problem are available.### Read problems statements in [Mandarin Chinese](http://www.codechef.com/download/translated/AUG14/mandarin/CRAWA.pdf) and [Russian](http://www.codechef.com/download/translated/AUG14/russian/CRAWA.pdf).
Oh no! Chefβs robot from problem "Reach The Point" ([RETPO](http://www.codechef.com/JULY14/problems/RETPO)) has broken up.
It's old oil tank has got leaked, it is leaking oil now.
The robot start doing the following weird moves. While moving it keeps leaving a trace of oil on the path it's been tracing.
Note that in a single step robot will move by one unit in the current direction it is moving.
- Initially the robot is at position **(0, 0)**.
- In the beginning it goes **1** step to the East (i.e. In a single step, its x coordinate will increase by 1 unit.)
- then **2** steps to the North, (i.e. In a single step, its y coordinate will increase by 1 unit.)
- then **3** steps to the West, (i.e. In a single step, its x coordinate will decrease by 1 unit.)
- then **4** steps to the South, (i.e. In a single step, its y coordinate will decrease by 1 unit.)
- then **5** steps to the East,
- and so on.
Thus each time the robot turns **90** degrees anti clockwise, and it will go one more step than before. Please view the following image to
understand the moves. The red line in the example shows the path traced by the robot having traces of oil on it.

Now chef wants to know whether the point **(X, Y)** will have traces of oil on it or not.
### Input
The first line of the input contains an integer **T** denoting the number of test cases. The description of **T** test cases follows.
For each test case, there is a single line containing two space-separated integers **X** and **Y**.
### Output
For each test case, output a single line containing βYESβ (without quotes) if robot will reach point **(X, Y)** and βNOβ otherwise.
### Constraints
- **1 β€ T β€ 100000 = 105**
- **-1000000000 β€ X, Y β€ 1000000000**, i.e., **-109 β€ X, Y β€ 109**
### Example
<pre><b>Input:</b>
3
3 3
3 5
0 0
<b>Output:</b>
YES
NO
YES
</pre> **Explanation**
The points **(0, 0)** and **(3, 3)** will be having trace of oil while point **(3, 5)** will not have any trace of oil because point **(3, 5)** does not lie on the trajectory of robot.