#GYM104755M. Hexagons

Hexagons

本题没有可用的提交语言。

Description

The plane is partitioned into regular hexagons. A grasshopper is sitting in one of the hexagons (the origin). The grasshopper begins to jump around; at time $i$, it makes a jump covering $i$ hexagons positioned in a straight line. That is, at time $1$ it jumps $1$ cell, at time $2$ it jumps $2$ cells, at time $3$ it jumps $3$ cells and so on.

Let the distance between two hexagons be the length of the shortest path between them that consists of hexagons and where each two adjacent hexagons are connected by an edge. There are two restrictions on the jumps of the grasshopper:

  • the grasshopper always jumps so that the distance from the origin after the jump is larger that before;
  • the grasshopper never jumps to a cell it could also have reached with fewer jumps.

Your task, given the coordinates of a goal hexagon, is to determine whether the grasshopper can ever reach it by performing the jumping described above. The coordinate system is defined so that the first coordinate defines the column, and the second defines the north-west to south-east diagonal as in the figure.

For example, the picture shows the cells reachable in at most $2$ jumps. The red cell is the origin, the green cells are reachable with the first jump, the blue cells are reachable with the second jump, the gray cells are unreachable.

The first line contains a single integer $t$ ($1 \leq t \leq 10^5$), the number of test cases. Each of the next $t$ lines contains two integers $x$ and $y$ ($-10^9 \leq x, y \leq 10^9$), the coordinates of the goal vertex.

For each test case, output "Yes" if the given cell is reachable and "No" otherwise.

Input

The first line contains a single integer $t$ ($1 \leq t \leq 10^5$), the number of test cases. Each of the next $t$ lines contains two integers $x$ and $y$ ($-10^9 \leq x, y \leq 10^9$), the coordinates of the goal vertex.

Output

For each test case, output "Yes" if the given cell is reachable and "No" otherwise.

7
0 -1
-2 0
1 2
-3 0
2 2
0 0
-1 -2
Yes
No
Yes
Yes
No
Yes
Yes