Hidden triangles#4600

Hidden triangles

6 seconds
256 megabytes
Very easy

triangles are put on the plane in order from to . Whole inside region of each triangle is opaque and covers everything under it.

Determine, which of the triangles are visible on the plane. I.e. those that have positive area, not covered above with any other triangle.

Input

In the first line, the number is the amount of triangles. Then in lines triangles are listed in the order they were put to the plane. Each triangle is defined with integers x_{i1}, y_{i1}, x_{i2}, y_{i2}, x_{i3}, y_{i3}, which are the coordinates of its vertices. All the triangles are not degenerated. Any edge of a triangle has no more than one common point with any edge of another triangle.

Output

Output the amount of visible triangles in the first line. List their numbers in any order in the second line.

Constraints

≤ ≤

≤ x_{ij}, y_{ij} ≤ , for ≤ ≤ , ≤ ≤ .

Examples

Example 1

Loading
Loading