The segments#655

The segments

1 second
128 megabytes
Easy

Two segments are given on the plane. Each segment is parallel to either the axis or the axis. Determine whether the segments intersect and, if so, in what way.

Input

Each of the two lines contains four integers: x_1, y_1, x_2, y_2 (-1000 \le x_1, y_1, x_2, y_2 \le 1000) — the coordinates of the segment endpoints.

Output

Print one of the following words:

  • NO — if the segments do not intersect;

  • POINT — if the intersection of the segments is a point;

  • SEGMENT — if the intersection of the segments is a segment.

Examples

Example 1

Loading
Loading