题目描述
Given the coordinates (x, y) of a point in 2-D plane. Find if it is possible to reach (x, y) from (0, 0). The only possible moves from any coordinate (i, j) are as follows:
Go to the point with coordinates (i + 1, j + 1).
Go to the point with coordinates (i + 1, j - 1)
Go to the point with coordinates (i - 1, j + 1).
Go to the point with coordinates (i - 1, j - 1).
------ Input Format ------
- First line will contain T, number of testcases. Then the testcases follow.
- Each testcase contains of a single line of input, two integers x, y.
------ Output Format ------
For each test case, print YES if it is possible to reach (x, y) from (0, 0), otherwise print NO.
You may print each character of the string in uppercase or lowercase (for example, the strings "yEs", "yes", "Yes" and "YES" will all be treated as identical).
------ Constraints ------
$1 ≤ T ≤ 2\cdot10^{4}$
$-10^{9} ≤ x, y ≤ 10^{9}$
----- Sample Input 1 ------
6
0 2
1 2
-1 -3
-1 0
-3 1
2 -1
----- Sample Output 1 ------
YES
NO
YES
NO
YES
NO
----- explanation 1 ------
Test case $1$: A valid sequence of moves can be: $\;(0, 0) \rightarrow (1, 1) \rightarrow (0, 2)$.
Test case $2$: There is no possible way to reach the point $(1, 2)$ from $(0, 0)$.
Test case $3$: A valid sequence of moves can be: $\;(0, 0) \rightarrow (-1, -1) \rightarrow (0, -2) \rightarrow (-1, -3)$.
输入格式
见题面
输出格式
见题面