Chords
Execution time limit is 1 second
Runtime memory usage limit is 128 megabytes
There are points placed at equal intervals on a circle, numbered to in a clockwise direction starting from a certain point.
There are also chords on the circle, with the -th chord connecting points and . It is guaranteed that all the values , are distinct.
Determine whether there is an intersection between the chords.
Input
The first line contains the number of chords . Each of the following lines contains a pair of numbers .
Output
Print "Yes", if there exists an intersection between the chords, and "No" otherwise.
Examples
Input #1
Answer #1
Input #2
Answer #2
Input #3
Answer #3
Submissions 167
Acceptance rate 10%