Segments intersection#839

Segments intersection

1 second
128 megabytes
Easy

Given two line segments on a plane with integer coordinates of their endpoints in the Cartesian coordinate system. Determine whether the segments have at least one common point.

Input

The first line contains the coordinates of the first endpoint of the first segment, and the second line contains the coordinates of the second endpoint of the first segment. The third and fourth lines contain the coordinates of the endpoints of the second segment. All coordinates are integers with absolute values not exceeding 10^4.

Output

Print "Yes" if the segments have a common point, and "No" otherwise.

Examples

Example 1

Loading
Loading

Example 2

Loading
Loading