to time and one that goes from time to time . Since he doesn't want to waste his friends' time, would like to know if the two clips overlap or not.
wants to share some top quality video clips with his friends. He has two clips that he cut from a video: one that goes from timeFormally, he wants to know if there exists an infinite amount of real numbers such that and . See the sample inputs for better clarification.
Input Specification
The first line of input will contain .
The second line of input will contain .
The third line of input will contain .
The fourth line of input will contain .
It's guaranteed that and .
Output Specification
If the clips overlap, output YES
. Otherwise, output NO
.
Sample Input 1
1
2
3
4
Sample Output 1
NO
Explanation for Sample Output 1
The clips do not overlap, 1 unit of time from 2 to 3 is skipped in between.
Sample Input 2
1
2
2
3
Sample Output 2
NO
Explanation for Sample Output 2
The clips share only one moment of time at 2, therefore we consider they don't overlap (and the second clip just continues from the first clip).
Sample Input 3
3
5
1
6
Sample Output 3
YES
Explanation for Sample Output 3
The first clip is contained in the second clip.
Sample Input 4
3
7
5
8
Sample Output 4
YES
Explanation for Sample Output 4
The clips overlap from time 5 to time 7.
Comments
( ͡° ͜ʖ ͡°)
Video clips of blitz chess. Because we need the maximum chess in as little time as possible. `
( ͡° ͜ʖ ͡°)
you killed the joke