#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*/ freopen(char *, char *, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *, ...);
int /*<<< orphan*/ stdin;
int main(int argc, char *argv[]) {
  int n, x, y;
  freopen("input.txt", "r", stdin);
  scanf("%d", &n);
  while (n--) {
    scanf("%d %d", &x, &y);
    if (x < 0 || y < 0) {
      printf("No Number\n");
      continue;
    }
    if (x == y) {
      printf("%d\n", (x / 2) * 4 + (x % 2));
    } else if (x == y + 2) {
      printf("%d\n", (x / 2) * 4 + (x % 2) - 2);
    } else {
      printf("No Number\n");
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2e9b(%rip),%rax
mov    (%rax),%edx
lea    0xeaa(%rip),%rdi
lea    0xead(%rip),%rsi
call   1040 <freopen@plt>
lea    0xea6(%rip),%rdi
lea    -0x14(%rbp),%rsi
mov    $0x0,%al
call   1050 <scanf@plt>
mov    -0x14(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x14(%rbp)
cmp    $0x0,%eax
je     125d <main+0x12d>
lea    0xe7d(%rip),%rdi
lea    -0x18(%rbp),%rsi
lea    -0x1c(%rbp),%rdx
mov    $0x0,%al
call   1050 <scanf@plt>
cmpl   $0x0,-0x18(%rbp)
jl     11b2 <main+0x82>
cmpl   $0x0,-0x1c(%rbp)
jge    11c5 <main+0x95>
lea    0xe59(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1174 <main+0x44>
mov    -0x18(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jne    1201 <main+0xd1>
mov    -0x18(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%esi
shl    $0x2,%esi
mov    -0x18(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
add    %edx,%esi
lea    0xe28(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1258 <main+0x128>
mov    -0x18(%rbp),%eax
mov    -0x1c(%rbp),%ecx
add    $0x2,%ecx
cmp    %ecx,%eax
jne    1245 <main+0x115>
mov    -0x18(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%esi
shl    $0x2,%esi
mov    -0x18(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
add    %edx,%esi
sub    $0x2,%esi
lea    0xde4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1253 <main+0x123>
lea    0xdc6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1258 <main+0x128>
jmp    1174 <main+0x44>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x10,%rsp
mov    0x2e94(%rip),%rax
mov    (%rax),%edx
lea    0xea3(%rip),%rdi
lea    0xeb8(%rip),%rsi
call   1050 <freopen@plt>
lea    0xe9d(%rip),%rdi
lea    0x4(%rsp),%rsi
xor    %eax,%eax
call   1060 <scanf@plt>
subl   $0x1,0x4(%rsp)
jb     1213 <main+0xd3>
lea    0xe7c(%rip),%r14
lea    0xc(%rsp),%r15
lea    0x8(%rsp),%rbx
lea    0xe75(%rip),%r12
lea    0xe6a(%rip),%r13
jmp    11bf <main+0x7f>
nopl   0x0(%rax,%rax,1)
mov    %r12,%rdi
call   1030 <puts@plt>
subl   $0x1,0x4(%rsp)
jb     1213 <main+0xd3>
mov    %r14,%rdi
mov    %r15,%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   1060 <scanf@plt>
mov    0xc(%rsp),%eax
test   %eax,%eax
js     11b0 <main+0x70>
mov    0x8(%rsp),%ecx
test   %ecx,%ecx
js     11b0 <main+0x70>
cmp    %ecx,%eax
jne    11f0 <main+0xb0>
mov    %eax,%ecx
and    $0xfffffffe,%ecx
and    $0x1,%eax
jmp    11ff <main+0xbf>
nopl   (%rax)
add    $0x2,%ecx
cmp    %ecx,%eax
jne    11b0 <main+0x70>
mov    %eax,%ecx
and    $0xfffffffe,%ecx
or     $0xfffffffe,%eax
lea    (%rax,%rcx,2),%esi
mov    %r13,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
subl   $0x1,0x4(%rsp)
jae    11bf <main+0x7f>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [10 x i8] c"input.txt\00"
@.str.1 = [2 x i8] c"r\00"
@stdin = global i32 0
@.str.2 = [3 x i8] c"%d\00"
@.str.3 = [6 x i8] c"%d %d\00"
@.str.5 = [4 x i8] c"%d\0A\00"
@str.6 = [10 x i8] c"No Number\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = bitcast i32* %3 to i8*
%7 = bitcast i32* %4 to i8*
%8 = bitcast i32* %5 to i8*
%9 = load i32, i32* @stdin
%10 = tail call i32 @freopen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 %9)
%11 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %3)
%12 = load i32, i32* %3
%13 = add nsw i32 %12, -1
store i32 %13, i32* %3
%14 = icmp eq i32 %12, 0
br i1 %14, label %47, label %15
15: ; preds = %2, %24
%16 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i32* %4, i32* %5)
%17 = load i32, i32* %4
%18 = icmp slt i32 %17, 0
%19 = load i32, i32* %5
%20 = icmp slt i32 %19, 0
%21 = select i1 %18, i1 true, i1 %20
br i1 %21, label %22, label %28
22: ; preds = %15
%23 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str.6, i64 0, i64 0))
br label %24
24: ; preds = %30, %45, %39, %22
%25 = load i32, i32* %3
%26 = add nsw i32 %25, -1
store i32 %26, i32* %3
%27 = icmp eq i32 %25, 0
br i1 %27, label %47, label %15
28: ; preds = %15
%29 = icmp eq i32 %17, %19
br i1 %29, label %30, label %36
30: ; preds = %28
%31 = shl nuw nsw i32 %17, 1
%32 = and i32 %31, -4
%33 = and i32 %17, 1
%34 = or i32 %32, %33
%35 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i32 %34)
br label %24
36: ; preds = %28
%37 = add nuw nsw i32 %19, 2
%38 = icmp eq i32 %17, %37
br i1 %38, label %39, label %45
39: ; preds = %36
%40 = shl nuw nsw i32 %17, 1
%41 = and i32 %40, -4
%42 = or i32 %17, -2
%43 = add i32 %42, %41
%44 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i32 %43)
br label %24
45: ; preds = %36
%46 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str.6, i64 0, i64 0))
br label %24
47: ; preds = %24, %2
ret i32 0
}