A sequence of length is sorted if for every .
You may perform either of the following operations zero or more times, in any order. Each operation uses one of the two choices.
Determine whether can be made sorted.
The input is given in the following format.
Print YES if the sequence can be made sorted, and NO otherwise.
The first line contains the integer . The second line contains space-separated integers .