Belonging of a point to an interval#4778

Belonging of a point to an interval

1 second
64 megabytes
Medium (≈1350)

Determine if point lies on the line, ray, or segment defined by points and .

Input

The first line of the input contains two integers representing the coordinates of point . The following two lines, each in the same format, provide the coordinates for points and (A \neq B). All coordinate values are integers and do not exceed in absolute value.

Output

On the first line, print YES if point lies on the line through and , otherwise print NO. On the second line, print YES if point lies on the ray starting at and passing through , otherwise print NO. On the third line, print YES if point lies on the segment between and , otherwise print NO.

Examples

Example 1

Loading
Loading