Given four points , , , and such that no three of these points are collinear.
Determine whether the line segments and intersect.
The input consists of exactly three groups. Each group contains two lines (a total of six lines in the input). The first line of each group provides the coordinates of segment in the format: A_x A_y B_x B_y. The second line of each group provides the coordinates of segment in the format: C_x C_y D_x D_y. All coordinates are integers, with absolute values not exceeding 10^6.
For each group, output YES on a separate line if the segments intersect, and NO otherwise.
Esempio 1