Pick
문제
Mirko recently read about Pick’s theorem that says the following: in the coordinate system, if we draw a polygon whose vertices are points with integer coordinates, and if denotes its area, the number of points with integer coordinates located inside the polygon, and the number of points with integer coordinates located on its edges (including the polygon’s vertices), then it always holds:
.
In order to test the theorem, Mirko used his smart board to create a polygon from magnetic sticks that have, during the night, sunk to the bottom of the board because due to gravity. Now, Mirko wants to construct a polygon of the minimal possible area while using all the sticks he found. Mirko can move the sticks anywhere on his board, but he must not rotate them. Mirko is equipped with the following:
- horizontal sticks of length ,
- vertical sticks of length ,
- diagonal sticks of length that form a angle with the positive part of -axis,
- diagonal sticks of length that form a angle with the positive part of -axis.
| [이미지 1] | [이미지 2] |
| Figure 2: For the polygon above: , , . | Figure 3: The sticks Mirko is equipped with. |
Determine the polygon of the minimal possible area that can be obtained so that all the sticks are used. You can assume that the input data is such that it is possible to construct at least one such polygon.
Also, it is possible to score partial points if, using all of the given sticks, you construct a valid polygon (that is not necessarily of the minimal possible area). For more details, consult the section “Scoring”.
입력
The first line of input contains four integers , , , from the task.
출력
You must output n lines where . In the th line, output integers and — the coordinates of the th polygon vertex. The first polygon vertex must be , and the other vertices can be printed in an arbitrary direction (either positive or negative). It is allowed that the consecutive polygon sides are parallel, but the polygon cannot touch or intersect itself.
예제
예제 1
1 1 1 0
0 0 1 1 0 1
예제 2
0 0 6 4
0 0 1 1 2 2 3 3 2 4 1 3 0 2 -1 3 -2 2 -1 1