Time limit 2000/4000/4000/4000 ms. Memory limit 65000/65000/65000/65000 Kb. Автор: Фёдор Меньшиков, ВГПУ.
Difficulty Gamma
Intersecting Line Segments
English translation is by Google
Russian
Four points (integer coordinates) in a plane are given
which represent the tips of two lines in a Cartesian coordinate system.
You are asked to determine whether these lines intersect or not.
Input specification
The first line contains the coordinates of the first tip of the
first line segment, the second - the second end of the first
line segment. The third and fourth points- the coordinates of
the ends of the second line segment.
Output specification
Display the word "Yes", followed by an end of line, if the
two lines intersect; or the word "No" followed by an end of line - otherwise.
Restrictions coordinates are integers and do not exceed 10.000.
Sample Input 1
|
Sample Input 2
|
0 0
1 0
1 0
1 1
|
0 0
1 0
2 0
3 0
|
Sample Output 1
|
Sample Output 1
|
Yes
|
No
|
Для отправки решений необходимо выполнить вход.
|