Cossack Vus and Friend at CP Olympiad
Once Cossack Vus had to monitor his friend's participation in a competitive programming olympiad.
There are problems at the olympiad, each of which is scored as an integer from to . If a participant solves a problem and receives points at time , then at any time , the number of points for that problem will not be less than .
Cossack Vus was busy that day, so he couldn't keep track of his friend's results. Therefore, he decided to take screenshots of the screen every minutes of the olympiad. In total, he took screenshots. Each screenshot shows the number of points his friend had at a certain time.
Unfortunately, all the screenshots got mixed up in Vus's gallery. Your task is to determine if the order of the screenshots in the gallery is possible.
Input
The first line contains two integers , () — the number of screenshots and the number of problems, respectively.
Each of the next lines contains integers () — the number of points for problem on the -th screenshot.
Output
Output «Yes
» if the screenshots in the gallery are in the same order as the time they were taken, and «No
» otherwise.
Examples
Note
In the first test, there were problems at the olympiad and it lasted for minutes. The answer is «Yes
» because the events could have occurred in the following order:
in the first minutes, Vus's friend solved the first problem and scored points;
in the next minutes, he solved the second problem and scored points;
then he tried to solve the second problem again and managed to score points;
after that, he attempted the last problem and scored points;
then he solved the third problem and scored points;
in the last minutes, he couldn't solve anything.
One reason why the answer is «No
» in the second test is that in the first minutes, he solved the first problem and scored points, but in the last minutes, he somehow had only points, which is not possible.
Scoring
In this problem, there are conditional blocks. If your solution works correctly for certain constraints, it will receive a certain number of points. Note that the evaluation is still in the testing phase.
( points): ;
( points): without additional constraints.