#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 */
typedef int /*<<< orphan*/ inp;
typedef int /*<<< orphan*/ Stack;
typedef int /*<<< orphan*/ Queue;

/* Variables and functions */
scalar_t__ fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ memset(int *, int /*<<< orphan*/, int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ sscanf(char *, char *, int *);
int /*<<< orphan*/ stdin;
char *strtok(char *, char *);
int main() {
  char inp[10001];
  while (fgets(inp, sizeof(inp), stdin)) {
    char *start = inp;
    start = strtok(start, " ");
    int Queue[10001];
    memset(Queue, 0, sizeof(Queue));
    int Qidx = 0;
    while (start != NULL) {
      sscanf(start, "%d", &Queue[Qidx]);
      ++Qidx;
      start = strtok(NULL, " ");
    }
    start = inp;
    start = strtok(start, " ");
    fgets(inp, sizeof(inp), stdin);
    while (start != NULL) {
      sscanf(start, "%d", &Queue[Qidx]);
      ++Qidx;
      start = strtok(NULL, " ");
    }
    fgets(inp, sizeof(inp), stdin);
    int Queryidx = Qidx / 2;
    int End = Qidx;
    int Mid = Queryidx;
    Qidx = 0;
    int Stack[10001];
    memset(Stack, 0, sizeof(Stack));
    int Sidx = 1;
    while (Queryidx < End && Qidx <= Mid) {
      if (Stack[Sidx - 1] == Queue[Queryidx]) {
        ++Queryidx;
        --Sidx;
      } else if (Queue[Qidx] == Queue[Queryidx]) {
        ++Queryidx;
        ++Qidx;
      } else {
        Stack[Sidx] = Queue[Qidx];
        ++Sidx;
        ++Qidx;
      }
    }
    if (Queryidx == End)
      printf("Yes\n");
    else
      printf("No\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x15fe0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x2720(%rbp),%rdi
mov    0x2e78(%rip),%rax
mov    (%rax),%edx
mov    $0x2711,%esi
call   1050 <fgets@plt>
cmp    $0x0,%rax
je     1484 <main+0x334>
lea    -0x2720(%rbp),%rax
mov    %rax,-0x2728(%rbp)
mov    -0x2728(%rbp),%rdi
lea    0xe5e(%rip),%rsi
call   1070 <strtok@plt>
mov    %rax,-0x2728(%rbp)
lea    -0xc370(%rbp),%rdi
xor    %esi,%esi
mov    $0x9c44,%edx
call   1040 <memset@plt>
movl   $0x0,-0xc374(%rbp)
cmpq   $0x0,-0x2728(%rbp)
je     122c <main+0xdc>
mov    -0x2728(%rbp),%rdi
movslq -0xc374(%rbp),%rax
lea    -0xc370(%rbp),%rdx
shl    $0x2,%rax
add    %rax,%rdx
lea    0xe06(%rip),%rsi
call   1060 <sscanf@plt>
mov    -0xc374(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc374(%rbp)
xor    %eax,%eax
mov    %eax,%edi
lea    0xde5(%rip),%rsi
call   1070 <strtok@plt>
mov    %rax,-0x2728(%rbp)
jmp    11cb <main+0x7b>
lea    -0x2720(%rbp),%rax
mov    %rax,-0x2728(%rbp)
mov    -0x2728(%rbp),%rdi
lea    0xdb8(%rip),%rsi
call   1070 <strtok@plt>
mov    %rax,-0x2728(%rbp)
lea    -0x2720(%rbp),%rdi
mov    0x2d86(%rip),%rax
mov    (%rax),%edx
mov    $0x2711,%esi
call   1050 <fgets@plt>
cmpq   $0x0,-0x2728(%rbp)
je     12cf <main+0x17f>
mov    -0x2728(%rbp),%rdi
movslq -0xc374(%rbp),%rax
lea    -0xc370(%rbp),%rdx
shl    $0x2,%rax
add    %rax,%rdx
lea    0xd63(%rip),%rsi
call   1060 <sscanf@plt>
mov    -0xc374(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc374(%rbp)
xor    %eax,%eax
mov    %eax,%edi
lea    0xd42(%rip),%rsi
call   1070 <strtok@plt>
mov    %rax,-0x2728(%rbp)
jmp    126e <main+0x11e>
lea    -0x2720(%rbp),%rdi
mov    0x2d0b(%rip),%rax
mov    (%rax),%edx
mov    $0x2711,%esi
call   1050 <fgets@plt>
mov    -0xc374(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0xc378(%rbp)
mov    -0xc374(%rbp),%eax
mov    %eax,-0xc37c(%rbp)
mov    -0xc378(%rbp),%eax
mov    %eax,-0xc380(%rbp)
movl   $0x0,-0xc374(%rbp)
lea    -0x15fd0(%rbp),%rdi
xor    %esi,%esi
mov    $0x9c44,%edx
call   1040 <memset@plt>
movl   $0x1,-0x15fd4(%rbp)
mov    -0xc378(%rbp),%ecx
xor    %eax,%eax
cmp    -0xc37c(%rbp),%ecx
mov    %al,-0x15fd5(%rbp)
jge    136b <main+0x21b>
mov    -0xc374(%rbp),%eax
cmp    -0xc380(%rbp),%eax
setle  %al
mov    %al,-0x15fd5(%rbp)
mov    -0x15fd5(%rbp),%al
test   $0x1,%al
jne    137e <main+0x22e>
jmp    1450 <main+0x300>
mov    -0x15fd4(%rbp),%eax
sub    $0x1,%eax
cltq
mov    -0x15fd0(%rbp,%rax,4),%eax
movslq -0xc378(%rbp),%rcx
cmp    -0xc370(%rbp,%rcx,4),%eax
jne    13c7 <main+0x277>
mov    -0xc378(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc378(%rbp)
mov    -0x15fd4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x15fd4(%rbp)
jmp    144b <main+0x2fb>
movslq -0xc374(%rbp),%rax
mov    -0xc370(%rbp,%rax,4),%eax
movslq -0xc378(%rbp),%rcx
cmp    -0xc370(%rbp,%rcx,4),%eax
jne    140c <main+0x2bc>
mov    -0xc378(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc378(%rbp)
mov    -0xc374(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc374(%rbp)
jmp    1446 <main+0x2f6>
movslq -0xc374(%rbp),%rax
mov    -0xc370(%rbp,%rax,4),%ecx
movslq -0x15fd4(%rbp),%rax
mov    %ecx,-0x15fd0(%rbp,%rax,4)
mov    -0x15fd4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x15fd4(%rbp)
mov    -0xc374(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc374(%rbp)
jmp    144b <main+0x2fb>
jmp    133c <main+0x1ec>
mov    -0xc378(%rbp),%eax
cmp    -0xc37c(%rbp),%eax
jne    1473 <main+0x323>
lea    0xb9c(%rip),%rdi
call   1030 <printf@plt>
jmp    147f <main+0x32f>
lea    0xb90(%rip),%rdi
call   1030 <printf@plt>
jmp    1162 <main+0x12>
xor    %eax,%eax
add    $0x15fe0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x15fb8,%rsp
mov    0x2e80(%rip),%r12
mov    (%r12),%edx
mov    %rsp,%rdi
mov    $0x2711,%esi
call   1050 <fgets@plt>
test   %rax,%rax
je     135f <main+0x20f>
lea    0xe77(%rip),%r15
mov    %rsp,%rbx
lea    0xe6f(%rip),%r13
jmp    11d9 <main+0x89>
cs nopw 0x0(%rax,%rax,1)
nop
mov    %ebx,%eax
cmp    %r14d,%eax
lea    0xe59(%rip),%rdi
lea    0xe55(%rip),%rax
cmove  %rax,%rdi
call   1030 <puts@plt>
mov    (%r12),%edx
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x2711,%esi
call   1050 <fgets@plt>
test   %rax,%rax
je     135f <main+0x20f>
mov    %rbx,%rdi
mov    %r15,%rsi
call   1070 <strtok@plt>
mov    %rax,%rbp
lea    0x2720(%rsp),%rdi
xor    %esi,%esi
mov    $0x9c44,%edx
call   1040 <memset@plt>
mov    $0x0,%r14d
test   %rbp,%rbp
je     1248 <main+0xf8>
xor    %r14d,%r14d
lea    0x2720(%rsp),%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %rbp,%rdi
mov    %r13,%rsi
mov    %rbx,%rdx
call   1060 <sscanf@plt>
xor    %edi,%edi
mov    %r15,%rsi
call   1070 <strtok@plt>
mov    %rax,%rbp
add    $0x4,%rbx
add    $0x1,%r14d
test   %rax,%rax
jne    1220 <main+0xd0>
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    %r15,%rsi
call   1070 <strtok@plt>
mov    %rax,%rbp
mov    (%r12),%edx
mov    %rbx,%rdi
mov    $0x2711,%esi
call   1050 <fgets@plt>
test   %rbp,%rbp
je     12a8 <main+0x158>
mov    %r14d,%eax
lea    (%rsp,%rax,4),%r12
add    $0x2720,%r12
nopl   (%rax)
mov    %rbp,%rdi
mov    %r13,%rsi
mov    %r12,%rdx
call   1060 <sscanf@plt>
xor    %edi,%edi
mov    %r15,%rsi
call   1070 <strtok@plt>
mov    %rax,%rbp
add    $0x4,%r12
add    $0x1,%r14d
test   %rax,%rax
jne    1280 <main+0x130>
mov    0x2d39(%rip),%r12
mov    (%r12),%edx
mov    %rbx,%rdi
mov    $0x2711,%esi
call   1050 <fgets@plt>
mov    %r14d,%ebx
shr    %ebx
lea    0xc370(%rsp),%rdi
xor    %esi,%esi
mov    $0x9c44,%edx
call   1040 <memset@plt>
cmp    %r14d,%ebx
jge    11a0 <main+0x50>
xor    %ecx,%ecx
mov    $0x1,%edx
mov    %ebx,%eax
nopl   0x0(%rax,%rax,1)
movslq %edx,%rsi
movslq %eax,%rdi
mov    0x2720(%rsp,%rdi,4),%edi
cmp    %edi,0xc36c(%rsp,%rsi,4)
jne    1320 <main+0x1d0>
add    $0xffffffff,%edx
add    $0x1,%eax
cmp    %r14d,%eax
jl     1356 <main+0x206>
jmp    11a2 <main+0x52>
cs nopw 0x0(%rax,%rax,1)
movslq %ecx,%rbp
mov    0x2720(%rsp,%rbp,4),%ebp
cmp    %edi,%ebp
jne    1340 <main+0x1f0>
add    $0x1,%eax
jmp    134a <main+0x1fa>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %ebp,0xc370(%rsp,%rsi,4)
add    $0x1,%edx
add    $0x1,%ecx
cmp    %r14d,%eax
jge    11a2 <main+0x52>
cmp    %ebx,%ecx
jle    12f0 <main+0x1a0>
jmp    11a2 <main+0x52>
xor    %eax,%eax
add    $0x15fb8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@stdin = global i32 0
@.str = [2 x i8] c" \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [5 x i8] c"Yes\0A\00"
@.str.3 = [4 x i8] c"No\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [10001 x i8]
%3 = alloca i8*
%4 = alloca [10001 x i32]
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca [10001 x i32]
%10 = alloca i32
store i32 0, i32* %1
br label %11
11: ; preds = %126, %0
%12 = getelementptr inbounds [10001 x i8], [10001 x i8]* %2, i64 0, i64 0
%13 = load i32, i32* @stdin
%14 = call i64 @fgets(i8* %12, i32 10001, i32 %13)
%15 = icmp ne i64 %14, 0
br i1 %15, label %16, label %127
16: ; preds = %11
%17 = getelementptr inbounds [10001 x i8], [10001 x i8]* %2, i64 0, i64 0
store i8* %17, i8** %3
%18 = load i8*, i8** %3
%19 = call i8* @strtok(i8* %18, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i8* %19, i8** %3
%20 = getelementptr inbounds [10001 x i32], [10001 x i32]* %4, i64 0, i64 0
%21 = call i32 @memset(i32* %20, i32 0, i32 40004)
store i32 0, i32* %5
br label %22
22: ; preds = %25, %16
%23 = load i8*, i8** %3
%24 = icmp ne i8* %23, null
br i1 %24, label %25, label %34
25: ; preds = %22
%26 = load i8*, i8** %3
%27 = load i32, i32* %5
%28 = sext i32 %27 to i64
%29 = getelementptr inbounds [10001 x i32], [10001 x i32]* %4, i64 0, i64 %28
%30 = call i32 @sscanf(i8* %26, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %29)
%31 = load i32, i32* %5
%32 = add nsw i32 %31, 1
store i32 %32, i32* %5
%33 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i8* %33, i8** %3
br label %22
34: ; preds = %22
%35 = getelementptr inbounds [10001 x i8], [10001 x i8]* %2, i64 0, i64 0
store i8* %35, i8** %3
%36 = load i8*, i8** %3
%37 = call i8* @strtok(i8* %36, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i8* %37, i8** %3
%38 = getelementptr inbounds [10001 x i8], [10001 x i8]* %2, i64 0, i64 0
%39 = load i32, i32* @stdin
%40 = call i64 @fgets(i8* %38, i32 10001, i32 %39)
br label %41
41: ; preds = %44, %34
%42 = load i8*, i8** %3
%43 = icmp ne i8* %42, null
br i1 %43, label %44, label %53
44: ; preds = %41
%45 = load i8*, i8** %3
%46 = load i32, i32* %5
%47 = sext i32 %46 to i64
%48 = getelementptr inbounds [10001 x i32], [10001 x i32]* %4, i64 0, i64 %47
%49 = call i32 @sscanf(i8* %45, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %48)
%50 = load i32, i32* %5
%51 = add nsw i32 %50, 1
store i32 %51, i32* %5
%52 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i8* %52, i8** %3
br label %41
53: ; preds = %41
%54 = getelementptr inbounds [10001 x i8], [10001 x i8]* %2, i64 0, i64 0
%55 = load i32, i32* @stdin
%56 = call i64 @fgets(i8* %54, i32 10001, i32 %55)
%57 = load i32, i32* %5
%58 = sdiv i32 %57, 2
store i32 %58, i32* %6
%59 = load i32, i32* %5
store i32 %59, i32* %7
%60 = load i32, i32* %6
store i32 %60, i32* %8
store i32 0, i32* %5
%61 = getelementptr inbounds [10001 x i32], [10001 x i32]* %9, i64 0, i64 0
%62 = call i32 @memset(i32* %61, i32 0, i32 40004)
store i32 1, i32* %10
br label %63
63: ; preds = %117, %53
%64 = load i32, i32* %6
%65 = load i32, i32* %7
%66 = icmp slt i32 %64, %65
br i1 %66, label %67, label %71
67: ; preds = %63
%68 = load i32, i32* %5
%69 = load i32, i32* %8
%70 = icmp sle i32 %68, %69
br label %71
71: ; preds = %67, %63
%72 = phi i1 [ false, %63 ], [ %70, %67 ]
br i1 %72, label %73, label %118
73: ; preds = %71
%74 = load i32, i32* %10
%75 = sub nsw i32 %74, 1
%76 = sext i32 %75 to i64
%77 = getelementptr inbounds [10001 x i32], [10001 x i32]* %9, i64 0, i64 %76
%78 = load i32, i32* %77
%79 = load i32, i32* %6
%80 = sext i32 %79 to i64
%81 = getelementptr inbounds [10001 x i32], [10001 x i32]* %4, i64 0, i64 %80
%82 = load i32, i32* %81
%83 = icmp eq i32 %78, %82
br i1 %83, label %84, label %89
84: ; preds = %73
%85 = load i32, i32* %6
%86 = add nsw i32 %85, 1
store i32 %86, i32* %6
%87 = load i32, i32* %10
%88 = add nsw i32 %87, -1
store i32 %88, i32* %10
br label %117
89: ; preds = %73
%90 = load i32, i32* %5
%91 = sext i32 %90 to i64
%92 = getelementptr inbounds [10001 x i32], [10001 x i32]* %4, i64 0, i64 %91
%93 = load i32, i32* %92
%94 = load i32, i32* %6
%95 = sext i32 %94 to i64
%96 = getelementptr inbounds [10001 x i32], [10001 x i32]* %4, i64 0, i64 %95
%97 = load i32, i32* %96
%98 = icmp eq i32 %93, %97
br i1 %98, label %99, label %104
99: ; preds = %89
%100 = load i32, i32* %6
%101 = add nsw i32 %100, 1
store i32 %101, i32* %6
%102 = load i32, i32* %5
%103 = add nsw i32 %102, 1
store i32 %103, i32* %5
br label %116
104: ; preds = %89
%105 = load i32, i32* %5
%106 = sext i32 %105 to i64
%107 = getelementptr inbounds [10001 x i32], [10001 x i32]* %4, i64 0, i64 %106
%108 = load i32, i32* %107
%109 = load i32, i32* %10
%110 = sext i32 %109 to i64
%111 = getelementptr inbounds [10001 x i32], [10001 x i32]* %9, i64 0, i64 %110
store i32 %108, i32* %111
%112 = load i32, i32* %10
%113 = add nsw i32 %112, 1
store i32 %113, i32* %10
%114 = load i32, i32* %5
%115 = add nsw i32 %114, 1
store i32 %115, i32* %5
br label %116
116: ; preds = %104, %99
br label %117
117: ; preds = %116, %84
br label %63
118: ; preds = %71
%119 = load i32, i32* %6
%120 = load i32, i32* %7
%121 = icmp eq i32 %119, %120
br i1 %121, label %122, label %124
122: ; preds = %118
%123 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
br label %126
124: ; preds = %118
%125 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
br label %126
126: ; preds = %124, %122
br label %11
127: ; preds = %11
ret i32 0
}

LLVM IR (-O2):
@stdin = global i32 0
@.str = [2 x i8] c" \00"
@.str.1 = [3 x i8] c"%d\00"
@str = [3 x i8] c"No\00"
@str.4 = [4 x i8] c"Yes\00"
define i32 @main() {
%1 = alloca [10001 x i8]
%2 = alloca [10001 x i32]
%3 = alloca [10001 x i32]
%4 = getelementptr inbounds [10001 x i8], [10001 x i8]* %1, i64 0, i64 0
%5 = load i32, i32* @stdin
%6 = call i64 @fgets(i8* %4, i32 10001, i32 %5)
%7 = icmp eq i64 %6, 0
br i1 %7, label %94, label %8
8: ; preds = %0
%9 = bitcast [10001 x i32]* %2 to i8*
%10 = getelementptr inbounds [10001 x i32], [10001 x i32]* %2, i64 0, i64 0
%11 = bitcast [10001 x i32]* %3 to i8*
%12 = getelementptr inbounds [10001 x i32], [10001 x i32]* %3, i64 0, i64 0
br label %13
13: ; preds = %8, %86
%14 = call i8* @strtok(i8* %4, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%15 = call i32 @memset(i32* %10, i32 0, i32 40004)
%16 = icmp eq i8* %14, null
br i1 %16, label %27, label %17
17: ; preds = %13, %17
%18 = phi i64 [ %22, %17 ], [ 0, %13 ]
%19 = phi i8* [ %23, %17 ], [ %14, %13 ]
%20 = getelementptr inbounds [10001 x i32], [10001 x i32]* %2, i64 0, i64 %18
%21 = call i32 @sscanf(i8* %19, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %20)
%22 = add nuw i64 %18, 1
%23 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%24 = icmp eq i8* %23, null
br i1 %24, label %25, label %17
25: ; preds = %17
%26 = trunc i64 %22 to i32
br label %27
27: ; preds = %25, %13
%28 = phi i32 [ 0, %13 ], [ %26, %25 ]
%29 = call i8* @strtok(i8* %4, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%30 = load i32, i32* @stdin
%31 = call i64 @fgets(i8* %4, i32 10001, i32 %30)
%32 = icmp eq i8* %29, null
br i1 %32, label %45, label %33
33: ; preds = %27
%34 = zext i32 %28 to i64
br label %35
35: ; preds = %33, %35
%36 = phi i64 [ %34, %33 ], [ %40, %35 ]
%37 = phi i8* [ %29, %33 ], [ %41, %35 ]
%38 = getelementptr inbounds [10001 x i32], [10001 x i32]* %2, i64 0, i64 %36
%39 = call i32 @sscanf(i8* %37, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %38)
%40 = add nuw i64 %36, 1
%41 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%42 = icmp eq i8* %41, null
br i1 %42, label %43, label %35
43: ; preds = %35
%44 = trunc i64 %40 to i32
br label %45
45: ; preds = %43, %27
%46 = phi i32 [ %28, %27 ], [ %44, %43 ]
%47 = load i32, i32* @stdin
%48 = call i64 @fgets(i8* %4, i32 10001, i32 %47)
%49 = lshr i32 %46, 1
%50 = call i32 @memset(i32* %12, i32 0, i32 40004)
%51 = icmp slt i32 %49, %46
br i1 %51, label %52, label %86
52: ; preds = %45, %79
%53 = phi i32 [ %82, %79 ], [ 1, %45 ]
%54 = phi i32 [ %81, %79 ], [ 0, %45 ]
%55 = phi i32 [ %80, %79 ], [ %49, %45 ]
%56 = add nsw i32 %53, -1
%57 = sext i32 %56 to i64
%58 = getelementptr inbounds [10001 x i32], [10001 x i32]* %3, i64 0, i64 %57
%59 = load i32, i32* %58
%60 = sext i32 %55 to i64
%61 = getelementptr inbounds [10001 x i32], [10001 x i32]* %2, i64 0, i64 %60
%62 = load i32, i32* %61
%63 = icmp eq i32 %59, %62
br i1 %63, label %64, label %66
64: ; preds = %52
%65 = add nsw i32 %55, 1
br label %79
66: ; preds = %52
%67 = sext i32 %54 to i64
%68 = getelementptr inbounds [10001 x i32], [10001 x i32]* %2, i64 0, i64 %67
%69 = load i32, i32* %68
%70 = icmp eq i32 %69, %62
br i1 %70, label %71, label %74
71: ; preds = %66
%72 = add nsw i32 %55, 1
%73 = add nsw i32 %54, 1
br label %79
74: ; preds = %66
%75 = sext i32 %53 to i64
%76 = getelementptr inbounds [10001 x i32], [10001 x i32]* %3, i64 0, i64 %75
store i32 %69, i32* %76
%77 = add nsw i32 %53, 1
%78 = add nsw i32 %54, 1
br label %79
79: ; preds = %71, %74, %64
%80 = phi i32 [ %65, %64 ], [ %72, %71 ], [ %55, %74 ]
%81 = phi i32 [ %54, %64 ], [ %73, %71 ], [ %78, %74 ]
%82 = phi i32 [ %56, %64 ], [ %53, %71 ], [ %77, %74 ]
%83 = icmp slt i32 %80, %46
%84 = icmp sle i32 %81, %49
%85 = select i1 %83, i1 %84, i1 false
br i1 %85, label %52, label %86
86: ; preds = %79, %45
%87 = phi i32 [ %49, %45 ], [ %80, %79 ]
%88 = icmp eq i32 %87, %46
%89 = select i1 %88, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @str.4, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @str, i64 0, i64 0)
%90 = call i32 @puts(i8* dereferenceable(1) %89)
%91 = load i32, i32* @stdin
%92 = call i64 @fgets(i8* %4, i32 10001, i32 %91)
%93 = icmp eq i64 %92, 0
br i1 %93, label %94, label %13
94: ; preds = %86, %0
ret i32 0
}