H. Haphazard Reconstruction
time limit per test
4 seconds
memory limit per test
1024 megabytes
input
standard input
output
standard output

Ench Lolz was playing chess, when he accidentally dropped his board on the ground, and everything shattered! All he remembers is that the chessboard was a square, with some number of white and black cells. He goes to the store and buys an $$$n$$$-by-$$$n$$$ grid and $$$k$$$ black tiles. Unfortunately for him, he forgot what a chessboard looks like and is now trying to construct it with the following instructions.

You are given a $$$n$$$-by-$$$n$$$ square, divided into $$$1$$$-by-$$$1$$$ cells. Initially every cell is white. You want to color exactly $$$k$$$ cells black in a way that satisfies the following condition:

  • Suppose you rotate the square by $$$90$$$ degrees clockwise. Then the coloring of the cells stays the same.

Determine if such a coloring is possible. For example, the first square shown here is valid, while the second one is not:

Input

Input consists of multiple tests. The first line contains $$$t$$$, the number of tests ($$$1 \le t \le 1\,000$$$).

The only line of each test contains $$$n$$$ and $$$k$$$ ($$$1 \le n, k \le 30\,000$$$).

Output

For each test, print YES if a coloring is possible, and NO otherwise.

Example
Input
4
3 5
3 6
1 30000
30000 30000
Output
YES
NO
NO
YES
Note

The first test corresponds to the square shown in the problem statement.

The second test corresponds to the invalid square shown. We can show that no valid placements are possible.