#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 x, cont_s = 0, cont_n = 0, N;
  scanf(" %d", &N);
  while (N > 0) {
    scanf(" %d", &x);
    if (x == 1)
      cont_s++;
    else
      cont_n++;
    N--;
  }
  if (cont_s >= cont_n)
    printf("N\n");
  else
    printf("Y\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
lea    0xebc(%rip),%rdi
lea    -0x14(%rbp),%rsi
call   1040 <scanf@plt>
cmpl   $0x0,-0x14(%rbp)
jle    1196 <main+0x76>
lea    0xea2(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
cmpl   $0x1,-0x8(%rbp)
jne    117f <main+0x5f>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1188 <main+0x68>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x14(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
jmp    114d <main+0x2d>
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jl     11b3 <main+0x93>
lea    0xe5b(%rip),%rdi
call   1030 <printf@plt>
jmp    11bf <main+0x9f>
lea    0xe4d(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
lea    0xed2(%rip),%rdi
mov    %rsp,%rsi
call   1040 <scanf@plt>
cmpl   $0x0,(%rsp)
jle    1192 <main+0x72>
xor    %ebp,%ebp
lea    0xebb(%rip),%r14
lea    0x4(%rsp),%r15
xor    %ebx,%ebx
nopl   0x0(%rax)
mov    %r14,%rdi
mov    %r15,%rsi
call   1040 <scanf@plt>
xor    %eax,%eax
xor    %ecx,%ecx
cmpl   $0x1,0x4(%rsp)
setne  %al
sete   %cl
add    %ecx,%ebx
add    %eax,%ebp
mov    (%rsp),%eax
lea    -0x1(%rax),%ecx
mov    %ecx,(%rsp)
cmp    $0x1,%eax
jg     1150 <main+0x30>
cmp    %ebp,%ebx
lea    0xe7f(%rip),%rax
lea    0xe7a(%rip),%rdi
cmovb  %rax,%rdi
jmp    1199 <main+0x79>
lea    0xe6d(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [4 x i8] c" %d\00"
@.str.1 = [3 x i8] c"N\0A\00"
@.str.2 = [3 x i8] c"Y\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
store i32 0, i32* %3
store i32 0, i32* %4
%6 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32* %5)
br label %7
7: ; preds = %20, %0
%8 = load i32, i32* %5
%9 = icmp sgt i32 %8, 0
br i1 %9, label %10, label %23
10: ; preds = %7
%11 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32* %2)
%12 = load i32, i32* %2
%13 = icmp eq i32 %12, 1
br i1 %13, label %14, label %17
14: ; preds = %10
%15 = load i32, i32* %3
%16 = add nsw i32 %15, 1
store i32 %16, i32* %3
br label %20
17: ; preds = %10
%18 = load i32, i32* %4
%19 = add nsw i32 %18, 1
store i32 %19, i32* %4
br label %20
20: ; preds = %17, %14
%21 = load i32, i32* %5
%22 = add nsw i32 %21, -1
store i32 %22, i32* %5
br label %7
23: ; preds = %7
%24 = load i32, i32* %3
%25 = load i32, i32* %4
%26 = icmp sge i32 %24, %25
br i1 %26, label %27, label %29
27: ; preds = %23
%28 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
br label %31
29: ; preds = %23
%30 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
br label %31
31: ; preds = %29, %27
ret i32 0
}

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