Sàimǎ chǎng

Time limit: 0.1s Memory limit: 256MB Input: Output:

For the purposes of this problem, a racetrack can be represented as a non-intersecting (possibly concave) polygon.

In a racetrack, corners are split into three categories:

  • Slow speed corners (either the corresponding interior or exterior angle is equal to exactly 4545^\circ.
  • Medium speed corners (either the corresponding interior or exterior angle is equal to exactly 9090^\circ.
  • High speed corners (either the corresponding interior or exterior angle is equal to exactly 135135^\circ.

For example, this racetrack has 33 slow speed corners (red), 11 medium speed corner (yellow) and 33 high speed corners (green).

Task

You are given three integers aa, bb and cc. Print any semiaxis-aligned polygon corresponding to a racetrack which has exactly aa slow speed corners, bb medium speed corners and cc high speed corners (and no other types of corners). If no such polygon exists, print NO instead.

In this problem, a polygon is called semiaxis-aligned if every one of its edges is parallel to at least one of the following lines:

  • y=0y=0 (the Ox axis)
  • x=0x=0 (the Oy axis)
  • x=yx=y
  • x=yx=-y

Input data

This problem has exactly one test, which contains multiple test cases. For additional information, please check the restrictions section of this statement.

The first line of input containts a single integer T(T=1 000)T \left(T=1\ 000\right) - the number of test cases.

The first (and only) line of each test case contains three integers aa, bb and cc - the number of slow speed, medium speed, and high speed corners, respectively.

Output data

For each test case, if there is no polygon satisfying all of the constraints, print NO.

Otherwise, print YES, followed by the coordinates of the a+b+ca+b+c vertices of any polygon which satisfies the given constraints. Note that the absolute value of the coordinates must be at most 10910^9.

Constraints and clarifications

  • This problem has exactly one test, which has T=1 000T=1 \ 000. Each test case is scored independently and is worth 0.10.1 points. Note that if the output format is incorrect, the score for your submission will be 00 points.
  • The output format is considered incorrect if, for example, the coordinates of the polygons' vertices exceed 10910^9 by absolute value, the number of vertices is incorrect, or if the first line of a testcase is neither YES\text{YES} nor NO\text{NO}.
  • Outputting NO\text{NO} for a test case where an answer exists or outputting an incorrect polygon with the correct number of vertices will not be considered as invalid format.
  • For all test cases, 0a,b,c1000 \le a,b,c \le 100, a+b+c3a+b+c \ge 3
# Score Constraints
1 100 No additional restrictions.

Example

stdin

6
6 4 5
4 0 0
2 2 2
2 1 0
1 4 1
3 1 3

stdout

NO
NO
YES
0 0
3 0
3 2
2 1
1 1
0 2
YES
0 0
1 0
1 1
YES
0 0
3 0
3 2
2 1
1 2
0 2
YES
0 0
2 0
4 2
2 2
1 1
1 2
-2 2

Explanation

We can show that no corresponding polygons exist for the first two test cases.

A possible polygon for the third test case:

A possible polygon for the fourth test case:

A possible polygon for the fifth test case:

A possible polygon for the sixth test case:

Log in or sign up to be able to send submissions!