favorite We need a little bit of your help to keep things running, click on this banner to learn more

Point on a ray

Point on a ray

Determine whether a given point belongs to the ray.


6 numbers are given - the coordinates of the point and the coordinates of the beginning and end of the vector. All input data are integers not exceeding 10000 by absolute value.


Print YES if the point belongs to the ray, and NO otherwise.

Time limit 1 second
Memory limit 122.17 MiB
Input example #1
1 6 3 7 5 8
Output example #1