#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(void) {
  int t, m, n;
  scanf("%d", &t);
  while (t--) {
    scanf("%d%d", &n, &m);
    if (m == n)
      printf("No Winner\n");
    else if (m > n)
      printf("Balaji %d\n", m - n);
    else
      printf("Bipin %d\n", n - m);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xecc(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x8(%rbp)
cmp    $0x0,%eax
je     11cd <main+0xad>
lea    0xea4(%rip),%rdi
lea    -0x10(%rbp),%rsi
lea    -0xc(%rbp),%rdx
mov    $0x0,%al
call   1040 <scanf@plt>
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jne    118a <main+0x6a>
lea    0xe87(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11c8 <main+0xa8>
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jle    11af <main+0x8f>
mov    -0xc(%rbp),%esi
sub    -0x10(%rbp),%esi
lea    0xe6d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11c3 <main+0xa3>
mov    -0x10(%rbp),%esi
sub    -0xc(%rbp),%esi
lea    0xe5f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11c8 <main+0xa8>
jmp    1141 <main+0x21>
xor    %eax,%eax
add    $0x10,%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    0xebd(%rip),%rdi
lea    0xc(%rsp),%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
subl   $0x1,0xc(%rsp)
jb     11d3 <main+0xa3>
lea    0xea1(%rip),%r14
lea    0x10(%rsp),%r15
lea    0x14(%rsp),%rbx
lea    0xeaa(%rip),%r12
lea    0xe8e(%rip),%r13
lea    0xe92(%rip),%rbp
jmp    118f <main+0x5f>
mov    %r12,%rdi
call   1030 <puts@plt>
subl   $0x1,0xc(%rsp)
jb     11d3 <main+0xa3>
mov    %r14,%rdi
mov    %r15,%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   1050 <scanf@plt>
mov    0x14(%rsp),%ecx
mov    0x10(%rsp),%esi
mov    %ecx,%eax
sub    %esi,%eax
je     1180 <main+0x50>
jle    11c0 <main+0x90>
mov    %r13,%rdi
mov    %eax,%esi
jmp    11c5 <main+0x95>
cs nopw 0x0(%rax,%rax,1)
sub    %ecx,%esi
mov    %rbp,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
subl   $0x1,0xc(%rsp)
jae    118f <main+0x5f>
xor    %eax,%eax
add    $0x18,%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 = [5 x i8] c"%d%d\00"
@.str.2 = [11 x i8] c"No Winner\0A\00"
@.str.3 = [11 x i8] c"Balaji %d\0A\00"
@.str.4 = [10 x i8] c"Bipin %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
br label %6
6: ; preds = %32, %0
%7 = load i32, i32* %2
%8 = add nsw i32 %7, -1
store i32 %8, i32* %2
%9 = icmp ne i32 %7, 0
br i1 %9, label %10, label %33
10: ; preds = %6
%11 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32* %4, i32* %3)
%12 = load i32, i32* %3
%13 = load i32, i32* %4
%14 = icmp eq i32 %12, %13
br i1 %14, label %15, label %17
15: ; preds = %10
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
br label %32
17: ; preds = %10
%18 = load i32, i32* %3
%19 = load i32, i32* %4
%20 = icmp sgt i32 %18, %19
br i1 %20, label %21, label %26
21: ; preds = %17
%22 = load i32, i32* %3
%23 = load i32, i32* %4
%24 = sub nsw i32 %22, %23
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0), i32 %24)
br label %31
26: ; preds = %17
%27 = load i32, i32* %4
%28 = load i32, i32* %3
%29 = sub nsw i32 %27, %28
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), i32 %29)
br label %31
31: ; preds = %26, %21
br label %32
32: ; preds = %31, %15
br label %6
33: ; preds = %6
ret i32 0
}

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