#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *, ...);
int main() {
  int lenth, sequence, min;
  scanf("%d %d", &lenth, &min);
  for (int i = 1; i < lenth; i++) {
    scanf("%d", &sequence);
    if (sequence < min) {
      printf("no\n");
      return 0;
    } else {
      min = sequence;
    }
  }
  printf("yes\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0x10(%rbp),%rdx
mov    $0x0,%al
call   1040 <scanf@plt>
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    11a7 <main+0x87>
lea    0xea4(%rip),%rdi
lea    -0xc(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    118e <main+0x6e>
lea    0xe89(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    11ba <main+0x9a>
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    1199 <main+0x79>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    114c <main+0x2c>
lea    0xe5c(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x10,%rsp
lea    0xecd(%rip),%rdi
lea    0x8(%rsp),%rsi
lea    0x4(%rsp),%rdx
xor    %eax,%eax
call   1040 <scanf@plt>
lea    0xebb(%rip),%r14
cmpl   $0x2,0x8(%rsp)
jl     1199 <main+0x79>
mov    $0x1,%ebp
lea    0xea5(%rip),%r15
lea    0xc(%rsp),%rbx
lea    0xea0(%rip),%r12
nopw   0x0(%rax,%rax,1)
mov    %r15,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
mov    0xc(%rsp),%eax
cmp    0x4(%rsp),%eax
jl     1196 <main+0x76>
mov    %eax,0x4(%rsp)
add    $0x1,%ebp
cmp    0x8(%rsp),%ebp
jl     1170 <main+0x50>
jmp    1199 <main+0x79>
mov    %r12,%r14
mov    %r14,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%d %d\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [4 x i8] c"no\0A\00"
@.str.3 = [5 x i8] c"yes\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
%6 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %2, i32* %4)
store i32 1, i32* %5
br label %7
7: ; preds = %21, %0
%8 = load i32, i32* %5
%9 = load i32, i32* %2
%10 = icmp slt i32 %8, %9
br i1 %10, label %11, label %24
11: ; preds = %7
%12 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %3)
%13 = load i32, i32* %3
%14 = load i32, i32* %4
%15 = icmp slt i32 %13, %14
br i1 %15, label %16, label %18
16: ; preds = %11
%17 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
store i32 0, i32* %1
br label %26
18: ; preds = %11
%19 = load i32, i32* %3
store i32 %19, i32* %4
br label %20
20: ; preds = %18
br label %21
21: ; preds = %20
%22 = load i32, i32* %5
%23 = add nsw i32 %22, 1
store i32 %23, i32* %5
br label %7
24: ; preds = %7
%25 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
store i32 0, i32* %1
br label %26
26: ; preds = %24, %16
%27 = load i32, i32* %1
ret i32 %27
}

LLVM IR (-O2):
@.str = [6 x i8] c"%d %d\00"
@.str.1 = [3 x i8] c"%d\00"
@str = [4 x i8] c"yes\00"
@str.4 = [3 x i8] c"no\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = bitcast i32* %1 to i8*
%5 = bitcast i32* %2 to i8*
%6 = bitcast i32* %3 to i8*
%7 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %3)
%8 = load i32, i32* %1
%9 = icmp sgt i32 %8, 1
br i1 %9, label %10, label %20
10: ; preds = %0, %16
%11 = phi i32 [ %17, %16 ], [ 1, %0 ]
%12 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%13 = load i32, i32* %2
%14 = load i32, i32* %3
%15 = icmp slt i32 %13, %14
br i1 %15, label %20, label %16
16: ; preds = %10
store i32 %13, i32* %3
%17 = add nuw nsw i32 %11, 1
%18 = load i32, i32* %1
%19 = icmp slt i32 %17, %18
br i1 %19, label %10, label %20
20: ; preds = %16, %10, %0
%21 = phi i8* [ getelementptr inbounds ([4 x i8], [4 x i8]* @str, i64 0, i64 0), %0 ], [ getelementptr inbounds ([3 x i8], [3 x i8]* @str.4, i64 0, i64 0), %10 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @str, i64 0, i64 0), %16 ]
%22 = call i32 @puts(i8* dereferenceable(1) %21)
ret i32 0
}