- Time limit: 1.00 s
- Memory limit: 512 MB
You have two coin piles containing and coins. On each move, you can either remove one coin from the left pile and two coins from the right pile, or two coins from the left pile and one coin from the right pile.
Your task is to efficiently find out if you can empty both the piles.
Input
The first input line has an integer : the number of tests.
After this, there are lines, each of which has two integers and : the numbers of coins in the piles.
Output
For each test, print "YES" if you can empty the piles and "NO" otherwise.
Constraints
Example
Input:
3 2 1 2 2 3 3
Output:
YES NO YES