HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Volumes > Fyodor Menshikov. Training > problem:


02D. 50667 - Intersecting Line Segments

Guest
• Discussion of problem (1)

Volume problems

• 01B. 50600 - Expression
• 01C. 50601 - Increasing sequence
• 01D. 50660 - Triangle and the point
• 01E. 50661 - nth Power of a Digit
• 01F. 50620 - Poker
• 02A. 50662 - Prime numbers (2)
• 02B. 50625 - Permutations
• 02C. 50626 - The route
• 02D. 50667 - Intersecting Line S...
• 02E. 50607 - Long sum
• 02F. 50647 - Spiral
• 03A. 50633 - The prime factors
• 03B. 50720 - Permutations (2)
• 03C. 50615 - Moneybox
• 03D. 50666 - The card and envelope
• 03E. 50606 - Long product
• 03F. 50616 - Snake

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