Apples#11799

Apples

1 second
256 megabytes
Hard

Nastia is playing a game. She has red, yellow, and green apples. In one move, she can replace two apples of different colors with one apple of the third color. Nastia wins if, after some number of moves, only one apple of any color remains.

Nastia is so skilled that for any non-negative , , , she can instantly tell whether it is possible to win the game. Can you?

Input

The first line contains a single integer (1 \le t \le 1000) — the number of test cases.

The next lines each contain three integers , , (0 \le a, b, c \le 10^9): the number of red, yellow, and green apples, respectively.

Output

Print digits in a single line, without spaces: if it is possible to win, or if not.

Your answer is considered correct only if you answer all test cases correctly.

Examples

Example 1

Loading
Loading

Note

Let each triplet (a, b, c) denote the number of red, yellow, and green apples, respectively.

For example, in the second test case, the initial triplet is (2, 3, 4). By replacing two apples of different colors with one apple of the third color, the following steps can be performed:

  1. Replace red + yellow: (2, 3, 4) \to (1, 2, 5)

  2. Replace red + yellow: (1, 2, 5) \to (0, 1, 6)

  3. Replace yellow + green: (0, 1, 6) \to (1, 0, 5)

  4. Replace red + green: (1, 0, 5) \to (0, 1, 4)

  5. Replace yellow + green: (0, 1, 4) \to (1, 0, 3)

  6. Replace red + green: (1, 0, 3) \to (0, 1, 2)

  7. Replace yellow + green: (0, 1, 2) \to (1, 0, 1)

  8. Replace red + green: (1, 0, 1) \to (0, 1, 0)

In the end, one yellow apple remains, which means Nastia wins!