~/algor $ cat problems/massiv-osuvchimi
Is the array increasing?
Easy
1000 ms
128 MB
29%
A positive integer $n$ and an array of $n$ integers are given. If the array elements are strictly increasing, print YES, otherwise NO (an array of one element is considered increasing):
$$a_{1} \lt a_{2} \lt \dots \lt a_{n}$$
Input
The first line contains a positive integer $n$. The second line contains $n$ integers separated by spaces.
Output
YES or NO accordingly.
Note
$1 \le n \le 10^{4}$
$-1000 \le a_{i} \le 1000$
Examples
Input #1
5 1 3 4 8 10
Output #1
YES
Input #2
4 1 2 2 3
Output #2
NO