#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*/ printf(char *, char *);
scalar_t__ scanf(char *, int *, int *);
int main(void) {
  int N, M, c[10001] = {0};
  c[2 + 2] = c[2 + 5] = c[2 + 10] = c[2 + 20] = c[2 + 50] = c[2 + 100] =
      c[5 + 5] = c[5 + 10] = c[5 + 20] = c[5 + 50] = c[5 + 100] = c[10 + 10] =
          c[10 + 20] = c[10 + 50] = c[10 + 100] = c[20 + 20] = c[20 + 50] =
              c[20 + 100] = c[50 + 50] = c[50 + 100] = c[50 + 100] = 1;
  while (scanf("%d %d", &N, &M) != EOF) {
    if ((N | M) == 0)
      break;
    printf("%s\n", (c[M - N] ? "possible" : "impossible"));
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x9c50,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x9c50(%rbp),%rdi
xor    %esi,%esi
mov    $0x9c44,%edx
call   1040 <memset@plt>
movl   $0x1,-0x99f8(%rbp)
movl   $0x1,-0x99f8(%rbp)
movl   $0x1,-0x9ac0(%rbp)
movl   $0x1,-0x9a70(%rbp)
movl   $0x1,-0x9b38(%rbp)
movl   $0x1,-0x9bb0(%rbp)
movl   $0x1,-0x9a98(%rbp)
movl   $0x1,-0x9b60(%rbp)
movl   $0x1,-0x9bd8(%rbp)
movl   $0x1,-0x9c00(%rbp)
movl   $0x1,-0x9aac(%rbp)
movl   $0x1,-0x9b74(%rbp)
movl   $0x1,-0x9bec(%rbp)
movl   $0x1,-0x9c14(%rbp)
movl   $0x1,-0x9c28(%rbp)
movl   $0x1,-0x9ab8(%rbp)
movl   $0x1,-0x9b80(%rbp)
movl   $0x1,-0x9bf8(%rbp)
movl   $0x1,-0x9c20(%rbp)
movl   $0x1,-0x9c34(%rbp)
movl   $0x1,-0x9c40(%rbp)
lea    0xdd2(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1050 <scanf@plt>
mov    0x2da6(%rip),%rcx
cmp    (%rcx),%rax
je     1294 <main+0x164>
mov    -0x8(%rbp),%eax
or     -0xc(%rbp),%eax
cmp    $0x0,%eax
jne    125f <main+0x12f>
jmp    1294 <main+0x164>
mov    -0xc(%rbp),%eax
sub    -0x8(%rbp),%eax
cltq
mov    -0x9c50(%rbp,%rax,4),%ecx
lea    0xd95(%rip),%rsi
lea    0xd90(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rsi
lea    0xd7c(%rip),%rdi
call   1030 <printf@plt>
jmp    1227 <main+0xf7>
xor    %eax,%eax
add    $0x9c50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x9c58,%rsp
lea    0x10(%rsp),%rdi
mov    $0x9c44,%edx
xor    %esi,%esi
call   1040 <memset@plt>
movl   $0x1,0x268(%rsp)
movl   $0x1,0x1a0(%rsp)
movl   $0x1,0x1f0(%rsp)
movl   $0x1,0x128(%rsp)
movl   $0x1,0xb0(%rsp)
movl   $0x1,0x1c8(%rsp)
movl   $0x1,0x100(%rsp)
movl   $0x1,0x88(%rsp)
movl   $0x1,0x60(%rsp)
movl   $0x1,0x1b4(%rsp)
movl   $0x1,0xec(%rsp)
movl   $0x1,0x74(%rsp)
movl   $0x1,0x4c(%rsp)
movl   $0x1,0x38(%rsp)
movl   $0x1,0x1a8(%rsp)
movl   $0x1,0xe0(%rsp)
movl   $0x1,0x68(%rsp)
movl   $0x1,0x40(%rsp)
movl   $0x1,0x2c(%rsp)
movl   $0x1,0x20(%rsp)
lea    0xde3(%rip),%rdi
lea    0xc(%rsp),%rsi
lea    0x8(%rsp),%rdx
call   1050 <scanf@plt>
mov    0x2db5(%rip),%r13
cmp    0x0(%r13),%rax
jne    124d <main+0x11d>
xor    %eax,%eax
add    $0x9c58,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xdb6(%rip),%rbp
lea    0xdab(%rip),%r14
lea    0xd9e(%rip),%r15
lea    0xc(%rsp),%r12
lea    0x8(%rsp),%rbx
jmp    128c <main+0x15c>
xchg   %ax,%ax
mov    %r14,%rdi
call   1030 <printf@plt>
mov    %r15,%rdi
mov    %r12,%rsi
mov    %rbx,%rdx
call   1050 <scanf@plt>
cmp    0x0(%r13),%rax
je     1239 <main+0x109>
mov    0xc(%rsp),%eax
mov    0x8(%rsp),%ecx
mov    %ecx,%edx
or     %eax,%edx
je     1239 <main+0x109>
sub    %eax,%ecx
movslq %ecx,%rax
cmpl   $0x0,0x10(%rsp,%rax,4)
mov    %rbp,%rsi
je     1270 <main+0x140>
lea    0xd5c(%rip),%rsi
jmp    1270 <main+0x140>

LLVM IR (-O0):
@.str = [6 x i8] c"%d %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 i32
%3 = alloca i32
%4 = alloca [10001 x i32]
store i32 0, i32* %1
%5 = bitcast [10001 x i32]* %4 to i8*
%6 = getelementptr inbounds [10001 x i32], [10001 x i32]* %4, i64 0, i64 150
store i32 1, i32* %6
%7 = getelementptr inbounds [10001 x i32], [10001 x i32]* %4, i64 0, i64 150
store i32 1, i32* %7
%8 = getelementptr inbounds [10001 x i32], [10001 x i32]* %4, i64 0, i64 100
store i32 1, i32* %8
%9 = getelementptr inbounds [10001 x i32], [10001 x i32]* %4, i64 0, i64 120
store i32 1, i32* %9
%10 = getelementptr inbounds [10001 x i32], [10001 x i32]* %4, i64 0, i64 70
store i32 1, i32* %10
%11 = getelementptr inbounds [10001 x i32], [10001 x i32]* %4, i64 0, i64 40
store i32 1, i32* %11
%12 = getelementptr inbounds [10001 x i32], [10001 x i32]* %4, i64 0, i64 110
store i32 1, i32* %12
%13 = getelementptr inbounds [10001 x i32], [10001 x i32]* %4, i64 0, i64 60
store i32 1, i32* %13
%14 = getelementptr inbounds [10001 x i32], [10001 x i32]* %4, i64 0, i64 30
store i32 1, i32* %14
%15 = getelementptr inbounds [10001 x i32], [10001 x i32]* %4, i64 0, i64 20
store i32 1, i32* %15
%16 = getelementptr inbounds [10001 x i32], [10001 x i32]* %4, i64 0, i64 105
store i32 1, i32* %16
%17 = getelementptr inbounds [10001 x i32], [10001 x i32]* %4, i64 0, i64 55
store i32 1, i32* %17
%18 = getelementptr inbounds [10001 x i32], [10001 x i32]* %4, i64 0, i64 25
store i32 1, i32* %18
%19 = getelementptr inbounds [10001 x i32], [10001 x i32]* %4, i64 0, i64 15
store i32 1, i32* %19
%20 = getelementptr inbounds [10001 x i32], [10001 x i32]* %4, i64 0, i64 10
store i32 1, i32* %20
%21 = getelementptr inbounds [10001 x i32], [10001 x i32]* %4, i64 0, i64 102
store i32 1, i32* %21
%22 = getelementptr inbounds [10001 x i32], [10001 x i32]* %4, i64 0, i64 52
store i32 1, i32* %22
%23 = getelementptr inbounds [10001 x i32], [10001 x i32]* %4, i64 0, i64 22
store i32 1, i32* %23
%24 = getelementptr inbounds [10001 x i32], [10001 x i32]* %4, i64 0, i64 12
store i32 1, i32* %24
%25 = getelementptr inbounds [10001 x i32], [10001 x i32]* %4, i64 0, i64 7
store i32 1, i32* %25
%26 = getelementptr inbounds [10001 x i32], [10001 x i32]* %4, i64 0, i64 4
store i32 1, i32* %26
br label %27
27: ; preds = %37, %0
%28 = call i64 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %2, i32* %3)
%29 = load i64, i64* @EOF
%30 = icmp ne i64 %28, %29
br i1 %30, label %31, label %48
31: ; preds = %27
%32 = load i32, i32* %2
%33 = load i32, i32* %3
%34 = or i32 %32, %33
%35 = icmp eq i32 %34, 0
br i1 %35, label %36, label %37
36: ; preds = %31
br label %48
37: ; preds = %31
%38 = load i32, i32* %3
%39 = load i32, i32* %2
%40 = sub nsw i32 %38, %39
%41 = sext i32 %40 to i64
%42 = getelementptr inbounds [10001 x i32], [10001 x i32]* %4, i64 0, i64 %41
%43 = load i32, i32* %42
%44 = icmp ne i32 %43, 0
%45 = zext i1 %44 to i64
%46 = select i1 %44, 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)
%47 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %46)
br label %27
48: ; preds = %36, %27
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"%d %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 i32
%3 = alloca [10001 x i32]
%4 = bitcast i32* %1 to i8*
%5 = bitcast i32* %2 to i8*
%6 = bitcast [10001 x i32]* %3 to i8*
%7 = getelementptr inbounds [10001 x i32], [10001 x i32]* %3, i64 0, i64 150
store i32 1, i32* %7
%8 = getelementptr inbounds [10001 x i32], [10001 x i32]* %3, i64 0, i64 100
store i32 1, i32* %8
%9 = getelementptr inbounds [10001 x i32], [10001 x i32]* %3, i64 0, i64 120
store i32 1, i32* %9
%10 = getelementptr inbounds [10001 x i32], [10001 x i32]* %3, i64 0, i64 70
store i32 1, i32* %10
%11 = getelementptr inbounds [10001 x i32], [10001 x i32]* %3, i64 0, i64 40
store i32 1, i32* %11
%12 = getelementptr inbounds [10001 x i32], [10001 x i32]* %3, i64 0, i64 110
store i32 1, i32* %12
%13 = getelementptr inbounds [10001 x i32], [10001 x i32]* %3, i64 0, i64 60
store i32 1, i32* %13
%14 = getelementptr inbounds [10001 x i32], [10001 x i32]* %3, i64 0, i64 30
store i32 1, i32* %14
%15 = getelementptr inbounds [10001 x i32], [10001 x i32]* %3, i64 0, i64 20
store i32 1, i32* %15
%16 = getelementptr inbounds [10001 x i32], [10001 x i32]* %3, i64 0, i64 105
store i32 1, i32* %16
%17 = getelementptr inbounds [10001 x i32], [10001 x i32]* %3, i64 0, i64 55
store i32 1, i32* %17
%18 = getelementptr inbounds [10001 x i32], [10001 x i32]* %3, i64 0, i64 25
store i32 1, i32* %18
%19 = getelementptr inbounds [10001 x i32], [10001 x i32]* %3, i64 0, i64 15
store i32 1, i32* %19
%20 = getelementptr inbounds [10001 x i32], [10001 x i32]* %3, i64 0, i64 10
store i32 1, i32* %20
%21 = getelementptr inbounds [10001 x i32], [10001 x i32]* %3, i64 0, i64 102
store i32 1, i32* %21
%22 = getelementptr inbounds [10001 x i32], [10001 x i32]* %3, i64 0, i64 52
store i32 1, i32* %22
%23 = getelementptr inbounds [10001 x i32], [10001 x i32]* %3, i64 0, i64 22
store i32 1, i32* %23
%24 = getelementptr inbounds [10001 x i32], [10001 x i32]* %3, i64 0, i64 12
store i32 1, i32* %24
%25 = getelementptr inbounds [10001 x i32], [10001 x i32]* %3, i64 0, i64 7
store i32 1, i32* %25
%26 = getelementptr inbounds [10001 x i32], [10001 x i32]* %3, i64 0, i64 4
store i32 1, i32* %26
%27 = call i64 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2)
%28 = load i64, i64* @EOF
%29 = icmp eq i64 %27, %28
br i1 %29, label %46, label %30
30: ; preds = %0, %35
%31 = load i32, i32* %1
%32 = load i32, i32* %2
%33 = or i32 %32, %31
%34 = icmp eq i32 %33, 0
br i1 %34, label %46, label %35
35: ; preds = %30
%36 = sub nsw i32 %32, %31
%37 = sext i32 %36 to i64
%38 = getelementptr inbounds [10001 x i32], [10001 x i32]* %3, i64 0, i64 %37
%39 = load i32, i32* %38
%40 = icmp eq i32 %39, 0
%41 = select i1 %40, 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)
%42 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %41)
%43 = call i64 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2)
%44 = load i64, i64* @EOF
%45 = icmp eq i64 %43, %44
br i1 %45, label %46, label %30
46: ; preds = %35, %30, %0
ret i32 0
}