Problems

# The segments

# The segments

Two line segments are given on the plane. Each segment is parallel to either the **X** axis or the **Y** axis. Your task is to figure out how the segments intersect.

** Input **

Each of two input lines contains four integers: **x****1**,**y****1**, **x****2**,**y****2** – the coordinates of segment endpoints. (**-1000 **≤**x****1**, **y****1**, **x****2**, **y****2 **≤** 1000**).

** Output **

Print one of the words:

- "NO" – if the segments do not intersect;
- "POINT" – if the segments' intersection forms a point;
- "SEGMENT" – if the segments' intersection forms a line segment.

Input example #1

0 0 0 1 1 0 1 1

Output example #1

NO