HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Volumes > Fyodor Menshikov. Training > problem:


02D. 50667 - Intersecting Line Segments

Guest
• Discussion of problem (1)

Volume problems

• 02A. 50662 - Prime numbers (2)
• 02E. 50607 - Long sum
• 03D. 50666 - The card and envelope
• 03E. 50606 - Long product
• 04A. 50634 - Perfect numbers
• 04B. 50635 - Decomposition into terms
• 04C. 50608 - Gangsters
• 04D. 50627 - Area of a polygon
• 02D. 50667 - Intersecting Line S...
• 03C. 50615 - Moneybox
• 05E. 50637 - Number systems

Feedback

If you notice incorrect translations in Contester, please let author know.

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

Для отправки решений необходимо выполнить вход.

www.contester.ru