| 시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
|---|---|---|---|---|---|
| 7 초 | 2048 MB | 5 | 0 | 0 | 0.000% |
Altair was playing with the points on the plane (as usual). At some point, he discovered a new game that he will play with you.
He made a convex polygon with $k$ sides on the two-dimensional plane. The polygon had a really nice property: no pair of sides are parallel. Then he extended every side of the polygon to a line, and found the intersection point for every pair of lines.
Now he gives you the points he got. You should find the initial polygon.
The first line contains one integer $n$ (1ドル \leq n \leq 200$): the number of points.
Each of the next $n$ lines contains four integers, $p_x,ドル $q_x,ドル $p_y,ドル and $q_y$ ($-10^6 \le p_x, p_y \le 10^6,ドル 1ドル \le q_x, q_y \le 10^6$): the coordinates of the $i$-th point. The $X$ coordinate equals $p_x / q_x,ドル and the $Y$ coordinate equals $p_y / q_y$. It is guaranteed that the values $p_x$ and $q_x$ are coprime, and the values $p_y$ and $q_y$ are coprime.
It is guaranteed that the polygon can be uniquely determined by the given points.
The first line of the output should contain one integer $k$: the size of the polygon.
You can output the vertices of the polygon in any order.
Each of the next $k$ lines should contain four integers, $p_x,ドル $q_x,ドル $p_y,ドル and $q_y$ ($-10^6 \le p_x, p_y \le 10^6,ドル 1ドル \le q_x, q_y \le 10^6$): the coordinates of the polygon vertices. The $X$ coordinate equals $p_x / q_x,ドル and the $Y$ coordinate equals $p_y / q_y$. The values $p_x$ and $q_x$ should be coprime, and the values $p_y$ and $q_y$ should be coprime.
6 1 1 2 1 12 5 24 5 0 1 0 1 3 1 3 1 -3 1 0 1 4 1 0 1
4 0 1 0 1 1 1 2 1 3 1 3 1 4 1 0 1