Smooth contest
Execution time limit is 1 second
Runtime memory usage limit is 128 megabytes
Andrey doesn't like sharp drops, especially in contests. Two numbers and form a sharp drop if . The competition is considered smooth if no difficulties of two neighboring problems form a sharp drop.
You are given numbers — the complexity of the problems. Determine if these tasks form a smooth competition.
Input
The first line contains five integers , , , , () — problem complexity .
Output
Print «YES
» if the numbers form a smooth competition, and «NO
» otherwise.
Examples
Input #1
Answer #1
Input #2
Answer #2
Note
Explanation for the first example:
, , , 1.
None of these pairs form a sharp drop, so the numbers form a smooth contest.
Explanation for the second example: , , , 2.
As you can see, the last two numbers form a sharp drop, so the numbers do not form a smooth contest.
Submissions 490
Acceptance rate 67%