#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__ EOF;
int /*<<< orphan*/ memset(int **, int /*<<< orphan*/, int);
int /*<<< orphan*/ printf(char *, char *);
scalar_t__ scanf(char *, int *);
scalar_t__ solve(int **);
int main() {
  int rectangle[3][3];
  while (scanf("%d", &rectangle[0][0]) != EOF) {
    rectangle[0][2] = (rectangle[1][2] = rectangle[2][2] = 0) + 1;
    scanf("%d", &rectangle[0][1]);
    printf("%s\n", solve(rectangle) ? "POSSIBLE" : "IMPOSSIBLE");
    memset(rectangle, 0, sizeof(int) * 9);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x30(%rbp),%rsi
lea    0xea6(%rip),%rdi
call   1060 <scanf@plt>
mov    0x2e82(%rip),%rcx
cmp    (%rcx),%rax
je     11db <main+0x9b>
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x1c(%rbp)
movl   $0x1,-0x28(%rbp)
lea    -0x30(%rbp),%rsi
add    $0x4,%rsi
lea    0xe6d(%rip),%rdi
call   1060 <scanf@plt>
lea    -0x30(%rbp),%rdi
call   1030 <solve@plt>
mov    %rax,%rcx
lea    0xe5c(%rip),%rsi
lea    0xe57(%rip),%rax
cmp    $0x0,%rcx
cmovne %rax,%rsi
lea    0xe42(%rip),%rdi
call   1040 <printf@plt>
lea    -0x30(%rbp),%rdi
xor    %esi,%esi
mov    $0x24,%edx
call   1050 <memset@plt>
jmp    114f <main+0xf>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
lea    0xeab(%rip),%rdi
mov    %rsp,%rsi
call   1060 <scanf@plt>
mov    0x2e84(%rip),%r13
cmp    0x0(%r13),%rax
je     11ef <main+0xaf>
lea    0xe8b(%rip),%r15
mov    %rsp,%rbx
lea    0xe88(%rip),%rbp
lea    0xe83(%rip),%r14
lea    0xe76(%rip),%r12
nopl   (%rax)
movl   $0x0,0x20(%rsp)
movl   $0x0,0x14(%rsp)
movl   $0x1,0x8(%rsp)
mov    %r15,%rdi
lea    0x4(%rsp),%rsi
call   1060 <scanf@plt>
mov    %rbx,%rdi
call   1030 <solve@plt>
test   %rax,%rax
mov    %r14,%rsi
cmove  %rbp,%rsi
mov    %r12,%rdi
call   1040 <printf@plt>
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x24,%edx
call   1050 <memset@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
call   1060 <scanf@plt>
cmp    0x0(%r13),%rax
jne    1190 <main+0x50>
xor    %eax,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@EOF = global i64 0
@.str.1 = [4 x i8] c"%s\0A\00"
@.str.2 = [9 x i8] c"POSSIBLE\00"
@.str.3 = [11 x i8] c"IMPOSSIBLE\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [3 x [3 x i32]]
store i32 0, i32* %1
br label %3
3: ; preds = %9, %0
%4 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %2, i64 0, i64 0
%5 = getelementptr inbounds [3 x i32], [3 x i32]* %4, i64 0, i64 0
%6 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %5)
%7 = load i64, i64* @EOF
%8 = icmp ne i64 %6, %7
br i1 %8, label %9, label %29
9: ; preds = %3
%10 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %2, i64 0, i64 2
%11 = getelementptr inbounds [3 x i32], [3 x i32]* %10, i64 0, i64 2
store i32 0, i32* %11
%12 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %2, i64 0, i64 1
%13 = getelementptr inbounds [3 x i32], [3 x i32]* %12, i64 0, i64 2
store i32 0, i32* %13
%14 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %2, i64 0, i64 0
%15 = getelementptr inbounds [3 x i32], [3 x i32]* %14, i64 0, i64 2
store i32 1, i32* %15
%16 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %2, i64 0, i64 0
%17 = getelementptr inbounds [3 x i32], [3 x i32]* %16, i64 0, i64 1
%18 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %17)
%19 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %2, i64 0, i64 0
%20 = bitcast [3 x i32]* %19 to i32**
%21 = call i64 @solve(i32** %20)
%22 = icmp ne i64 %21, 0
%23 = zext i1 %22 to i64
%24 = select i1 %22, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0)
%25 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %24)
%26 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %2, i64 0, i64 0
%27 = bitcast [3 x i32]* %26 to i32**
%28 = call i32 @memset(i32** %27, i32 0, i32 36)
br label %3
29: ; preds = %3
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@EOF = global i64 0
@.str.1 = [4 x i8] c"%s\0A\00"
@.str.2 = [9 x i8] c"POSSIBLE\00"
@.str.3 = [11 x i8] c"IMPOSSIBLE\00"
define i32 @main() {
%1 = alloca [3 x [3 x i32]]
%2 = bitcast [3 x [3 x i32]]* %1 to i8*
%3 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %1, i64 0, i64 0, i64 0
%4 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%5 = load i64, i64* @EOF
%6 = icmp eq i64 %4, %5
br i1 %6, label %23, label %7
7: ; preds = %0
%8 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %1, i64 0, i64 2, i64 2
%9 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %1, i64 0, i64 1, i64 2
%10 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %1, i64 0, i64 0, i64 2
%11 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %1, i64 0, i64 0, i64 1
%12 = bitcast [3 x [3 x i32]]* %1 to i32**
br label %13
13: ; preds = %7, %13
store i32 0, i32* %8
store i32 0, i32* %9
store i32 1, i32* %10
%14 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %11)
%15 = call i64 @solve(i32** %12)
%16 = icmp eq i64 %15, 0
%17 = select i1 %16, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0)
%18 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %17)
%19 = call i32 @memset(i32** %12, i32 0, i32 36)
%20 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%21 = load i64, i64* @EOF
%22 = icmp eq i64 %20, %21
br i1 %22, label %23, label %13
23: ; preds = %13, %0
ret i32 0
}