#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 *);
scalar_t__ scanf(char *, long long *, long long *, long long *);
int main() {
  long long int n, p, q, a, b, c, doudou, i;
  while (scanf("%lld %lld %lld", &n, &p, &q) != EOF) {
    if (n <= p)
      printf("LOSE\n");
    doudou = 0;
    for (i = p; i <= q; i++) {
      if ((n - i) % (p + q) <= p) {
        printf("WIN\n");
        doudou = 1;
        break;
      }
    }
    if (doudou == 0)
      printf("LOSE\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x10(%rbp),%rsi
lea    -0x18(%rbp),%rdx
lea    -0x20(%rbp),%rcx
call   1040 <scanf@plt>
mov    0x2e9a(%rip),%rcx
cmp    (%rcx),%rax
je     11f9 <main+0xd9>
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
jg     1171 <main+0x51>
lea    0xea3(%rip),%rdi
call   1030 <printf@plt>
movq   $0x0,-0x40(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x48(%rbp)
mov    -0x48(%rbp),%rax
cmp    -0x20(%rbp),%rax
jg     11dd <main+0xbd>
mov    -0x10(%rbp),%rax
sub    -0x48(%rbp),%rax
mov    -0x18(%rbp),%rcx
add    -0x20(%rbp),%rcx
cqto
idiv   %rcx
cmp    -0x18(%rbp),%rdx
jg     11c7 <main+0xa7>
lea    0xe60(%rip),%rdi
call   1030 <printf@plt>
movq   $0x1,-0x40(%rbp)
jmp    11dd <main+0xbd>
jmp    11cc <main+0xac>
mov    -0x48(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x48(%rbp)
jmp    1181 <main+0x61>
cmpq   $0x0,-0x40(%rbp)
jne    11f4 <main+0xd4>
lea    0xe20(%rip),%rdi
call   1030 <printf@plt>
jmp    112f <main+0xf>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
lea    0xecb(%rip),%rdi
lea    0x8(%rsp),%rsi
mov    %rsp,%rdx
lea    0x10(%rsp),%rcx
call   1040 <scanf@plt>
mov    0x2e9a(%rip),%r14
cmp    (%r14),%rax
jne    1164 <main+0x44>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xea8(%rip),%rbx
lea    0x8(%rsp),%r15
mov    %rsp,%r12
lea    0x10(%rsp),%r13
jmp    11a6 <main+0x86>
nopw   0x0(%rax,%rax,1)
lea    0xe88(%rip),%rdi
call   1030 <puts@plt>
lea    0xe6d(%rip),%rdi
mov    %r15,%rsi
mov    %r12,%rdx
mov    %r13,%rcx
call   1040 <scanf@plt>
cmp    (%r14),%rax
je     1153 <main+0x33>
mov    (%rsp),%rsi
cmp    %rsi,0x8(%rsp)
jg     11bd <main+0x9d>
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    (%rsp),%rsi
mov    0x10(%rsp),%rbp
mov    %rbx,%rdi
cmp    %rbp,%rsi
jg     1187 <main+0x67>
mov    0x8(%rsp),%rcx
lea    (%rsi,%rbp,1),%rdi
add    $0x1,%rbp
sub    %rsi,%rcx
nopw   0x0(%rax,%rax,1)
mov    %rcx,%rax
or     %rdi,%rax
shr    $0x20,%rax
je     1200 <main+0xe0>
mov    %rcx,%rax
cqto
idiv   %rdi
cmp    %rsi,%rdx
jg     120f <main+0xef>
jmp    1180 <main+0x60>
nopl   0x0(%rax,%rax,1)
mov    %ecx,%eax
xor    %edx,%edx
div    %edi
cmp    %rsi,%rdx
jle    1180 <main+0x60>
add    $0xffffffffffffffff,%rbp
add    $0xffffffffffffffff,%rcx
cmp    %rbp,%rsi
jne    11e0 <main+0xc0>
mov    %rbx,%rdi
jmp    1187 <main+0x67>

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

LLVM IR (-O2):
@.str = [15 x i8] c"%lld %lld %lld\00"
@EOF = global i64 0
@str.3 = [4 x i8] c"WIN\00"
@str.4 = [5 x i8] c"LOSE\00"
define i32 @main() {
%1 = alloca i64
%2 = alloca i64
%3 = alloca i64
%4 = bitcast i64* %1 to i8*
%5 = bitcast i64* %2 to i8*
%6 = bitcast i64* %3 to i8*
%7 = call i64 @scanf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i64* %1, i64* %2, i64* %3)
%8 = load i64, i64* @EOF
%9 = icmp eq i64 %7, %8
br i1 %9, label %38, label %10
10: ; preds = %0, %32
%11 = load i64, i64* %1
%12 = load i64, i64* %2
%13 = icmp sgt i64 %11, %12
br i1 %13, label %17, label %14
14: ; preds = %10
%15 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str.4, i64 0, i64 0))
%16 = load i64, i64* %2
br label %17
17: ; preds = %14, %10
%18 = phi i64 [ %16, %14 ], [ %12, %10 ]
%19 = load i64, i64* %3
%20 = icmp sgt i64 %18, %19
br i1 %20, label %32, label %21
21: ; preds = %17
%22 = load i64, i64* %1
%23 = add nsw i64 %19, %18
br label %27
24: ; preds = %27
%25 = add i64 %28, 1
%26 = icmp eq i64 %28, %19
br i1 %26, label %32, label %27
27: ; preds = %21, %24
%28 = phi i64 [ %18, %21 ], [ %25, %24 ]
%29 = sub nsw i64 %22, %28
%30 = srem i64 %29, %23
%31 = icmp sgt i64 %30, %18
br i1 %31, label %24, label %32
32: ; preds = %24, %27, %17
%33 = phi i8* [ getelementptr inbounds ([5 x i8], [5 x i8]* @str.4, i64 0, i64 0), %17 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @str.3, i64 0, i64 0), %27 ], [ getelementptr inbounds ([5 x i8], [5 x i8]* @str.4, i64 0, i64 0), %24 ]
%34 = call i32 @puts(i8* dereferenceable(1) %33)
%35 = call i64 @scanf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i64* %1, i64* %2, i64* %3)
%36 = load i64, i64* @EOF
%37 = icmp eq i64 %35, %36
br i1 %37, label %38, label %10
38: ; preds = %32, %0
ret i32 0
}