#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 */
scalar_t__ check(int *, int, int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int n;
  scanf("%d", &n);
  int a[n];
  int sum = 0;
  for (int i = 0; i < n; i++) {
    scanf("%d", &a[i]);
    sum = sum + a[i];
  }
  if (sum % 2 == 1) {
    printf("Not Possible");
  } else {
    if (check(a, sum / 2, n - 1)) {
      printf("Possible");
    } else {
      printf("Not Possible");
    }
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x10(%rbp)
lea    0xf(,%rax,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x28(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    11ca <main+0x9a>
mov    -0x28(%rbp),%rsi
movslq -0x20(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rsi
lea    0xe5a(%rip),%rdi
call   1040 <scanf@plt>
mov    -0x28(%rbp),%rcx
mov    -0x1c(%rbp),%eax
movslq -0x20(%rbp),%rdx
add    (%rcx,%rdx,4),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1184 <main+0x54>
mov    -0x1c(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x1,%edx
jne    11ef <main+0xbf>
lea    0xe1e(%rip),%rdi
call   1030 <printf@plt>
jmp    1237 <main+0x107>
mov    -0x28(%rbp),%rdi
mov    -0x1c(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%esi
mov    -0x8(%rbp),%edx
sub    $0x1,%edx
call   1050 <check@plt>
cmp    $0x0,%rax
je     1226 <main+0xf6>
lea    0xdeb(%rip),%rdi
call   1030 <printf@plt>
jmp    1232 <main+0x102>
lea    0xdd6(%rip),%rdi
call   1030 <printf@plt>
jmp    1237 <main+0x107>
mov    -0x10(%rbp),%rax
mov    %rax,%rsp
mov    -0x4(%rbp),%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
lea    0xeb8(%rip),%rdi
lea    -0x2c(%rbp),%rsi
call   1040 <scanf@plt>
mov    %rsp,%rbx
mov    -0x2c(%rbp),%eax
mov    %rsp,%r14
lea    0xf(,%rax,4),%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%r14
mov    %r14,%rsp
mov    -0x2c(%rbp),%edx
test   %edx,%edx
jle    11d2 <main+0xa2>
mov    %rbx,-0x38(%rbp)
xor    %r12d,%r12d
lea    0xe7f(%rip),%r15
mov    %r14,%rbx
xor    %r13d,%r13d
nopw   0x0(%rax,%rax,1)
mov    %r15,%rdi
mov    %rbx,%rsi
call   1040 <scanf@plt>
add    (%rbx),%r13d
add    $0x1,%r12
movslq -0x2c(%rbp),%rdx
add    $0x4,%rbx
cmp    %rdx,%r12
jl     1190 <main+0x60>
mov    %r13d,%eax
shr    $0x1f,%eax
add    %r13d,%eax
and    $0xfffffffe,%eax
mov    %r13d,%ecx
sub    %eax,%ecx
cmp    $0x1,%ecx
mov    -0x38(%rbp),%rbx
jne    11d5 <main+0xa5>
lea    0xe33(%rip),%rdi
jmp    1200 <main+0xd0>
xor    %r13d,%r13d
mov    %r13d,%esi
shr    $0x1f,%esi
add    %r13d,%esi
sar    %esi
add    $0xffffffff,%edx
mov    %r14,%rdi
call   1050 <check@plt>
test   %rax,%rax
lea    0xe0e(%rip),%rax
lea    0xe0b(%rip),%rdi
cmove  %rax,%rdi
call   1030 <printf@plt>
mov    %rbx,%rsp
xor    %eax,%eax
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [13 x i8] c"Not Possible\00"
@.str.2 = [9 x i8] c"Possible\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i32
%6 = alloca i32
store i32 0, i32* %1
%7 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%8 = load i32, i32* %2
%9 = zext i32 %8 to i64
%10 = call i8* @llvm.stacksave()
store i8* %10, i8** %3
%11 = alloca i32, i64 %9
store i64 %9, i64* %4
store i32 0, i32* %5
store i32 0, i32* %6
br label %12
12: ; preds = %27, %0
%13 = load i32, i32* %6
%14 = load i32, i32* %2
%15 = icmp slt i32 %13, %14
br i1 %15, label %16, label %30
16: ; preds = %12
%17 = load i32, i32* %6
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds i32, i32* %11, i64 %18
%20 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %19)
%21 = load i32, i32* %5
%22 = load i32, i32* %6
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds i32, i32* %11, i64 %23
%25 = load i32, i32* %24
%26 = add nsw i32 %21, %25
store i32 %26, i32* %5
br label %27
27: ; preds = %16
%28 = load i32, i32* %6
%29 = add nsw i32 %28, 1
store i32 %29, i32* %6
br label %12
30: ; preds = %12
%31 = load i32, i32* %5
%32 = srem i32 %31, 2
%33 = icmp eq i32 %32, 1
br i1 %33, label %34, label %36
34: ; preds = %30
%35 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
br label %48
36: ; preds = %30
%37 = load i32, i32* %5
%38 = sdiv i32 %37, 2
%39 = load i32, i32* %2
%40 = sub nsw i32 %39, 1
%41 = call i64 @check(i32* %11, i32 %38, i32 %40)
%42 = icmp ne i64 %41, 0
br i1 %42, label %43, label %45
43: ; preds = %36
%44 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0))
br label %47
45: ; preds = %36
%46 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
br label %47
47: ; preds = %45, %43
br label %48
48: ; preds = %47, %34
%49 = load i8*, i8** %3
%50 = load i32, i32* %1
ret i32 %50
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [13 x i8] c"Not Possible\00"
@.str.2 = [9 x i8] c"Possible\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = zext i32 %4 to i64
%6 = call i8* @llvm.stacksave()
%7 = alloca i32, i64 %5
%8 = load i32, i32* %1
%9 = icmp sgt i32 %8, 0
br i1 %9, label %13, label %24
10: ; preds = %13
%11 = srem i32 %19, 2
%12 = icmp eq i32 %11, 1
br i1 %12, label %32, label %24
13: ; preds = %0, %13
%14 = phi i64 [ %20, %13 ], [ 0, %0 ]
%15 = phi i32 [ %19, %13 ], [ 0, %0 ]
%16 = getelementptr inbounds i32, i32* %7, i64 %14
%17 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %16)
%18 = load i32, i32* %16
%19 = add nsw i32 %18, %15
%20 = add nuw nsw i64 %14, 1
%21 = load i32, i32* %1
%22 = sext i32 %21 to i64
%23 = icmp slt i64 %20, %22
br i1 %23, label %13, label %10
24: ; preds = %0, %10
%25 = phi i32 [ %21, %10 ], [ %8, %0 ]
%26 = phi i32 [ %19, %10 ], [ 0, %0 ]
%27 = sdiv i32 %26, 2
%28 = add nsw i32 %25, -1
%29 = call i64 @check(i32* %7, i32 %27, i32 %28)
%30 = icmp eq i64 %29, 0
%31 = select i1 %30, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0)
br label %32
32: ; preds = %24, %10
%33 = phi i8* [ getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), %10 ], [ %31, %24 ]
%34 = call i32 @printf(i8* dereferenceable(1) %33)
ret i32 0
}