Scanner inpu=new Scanner(System.in);
int N;
int count=0;
N=inpu.nextInt();
int array[]=new int[N];
for (int i = 0; i <N; i++) {
array[i]=inpu.nextInt();
}
for (int i = 0; i <N-1; i++) {
if(array[i]<=array[i+1]){
count++;
}
}
if(count==N-1){
System.out.print("yes");
}else{
System.out.print("No");
}
#Python 3.8
N = int(input())
A = input().split()
def ascend(lis):
index = 0
outdex = len(lis)
while index < outdex-1:
if lis[index] > lis[index+1]:
return False
index += 1
return True
if ascend(A):
print("Yes")
else:
print("No")
N = int(input())
A = input()
list = A.split(" β)
while len(list)!=N:
A = input()
list = A.split(β β)
Asd = True
for i in range(N):
if i+1<N:
if list[i]>list[i+1]:
Asd = False
if Asd:
print(βYesβ)
else:
print(βNoβ)
N = int(input())
A = input()
list = A.split(β β)
while len(list)!=N:
A = input()
list = A.split(β ")
Asd = True
for i in range(N):
if i+1<N:
if list[i]>list[i+1]:
Asd = False
if Asd:
print(βYesβ)
else:
print(βNoβ)
#include<iostream>
using namespace std;
int main(){
int times;
cin>>times;
int min =-3;
int right = false;
for(int i=0; i<times; i++){
int number;
cin >> number;
if(number> min){
min = number;
right = true;
}
else if(number == min){
right = true;
}
else{
right = false;
break;
}
}
if(right==true){
cout<<"Yes";
}
else{
cout<<"No";
}
}