#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 EXIT_SUCCESS;
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *, ...);
int main(int argc, char **argv) {
  int test, r, x, y;
  scanf("%d", &test);
  while (test--) {
    scanf("%d %d", &x, &y);
    if (y == x) {
      r = (4 * x + ((x + 1) % 2) * 2 - 2) / 2;
      printf("%d\n", r);
    } else if (y == x - 2) {
      r = (4 * x + ((x + 1) % 2) * 2 - 6) / 2;
      printf("%d\n", r);
    } else {
      printf("No Number\n");
    }
  }
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xec6(%rip),%rdi
lea    -0x14(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
mov    -0x14(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x14(%rbp)
cmp    $0x0,%eax
je     122d <main+0x10d>
lea    0xe9d(%rip),%rdi
lea    -0x1c(%rbp),%rsi
lea    -0x20(%rbp),%rdx
mov    $0x0,%al
call   1040 <scanf@plt>
mov    -0x20(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jne    11c1 <main+0xa1>
mov    -0x1c(%rbp),%eax
shl    $0x2,%eax
mov    %eax,-0x24(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    -0x24(%rbp),%eax
shl    $0x1,%edx
add    %edx,%eax
sub    $0x2,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%esi
lea    0xe51(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1228 <main+0x108>
mov    -0x20(%rbp),%eax
mov    -0x1c(%rbp),%ecx
sub    $0x2,%ecx
cmp    %ecx,%eax
jne    1215 <main+0xf5>
mov    -0x1c(%rbp),%eax
shl    $0x2,%eax
mov    %eax,-0x28(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    -0x28(%rbp),%eax
shl    $0x1,%edx
add    %edx,%eax
sub    $0x6,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%esi
lea    0xdfd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1223 <main+0x103>
lea    0xdee(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1228 <main+0x108>
jmp    1148 <main+0x28>
mov    0x2dac(%rip),%rax
mov    (%rax),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x10,%rsp
lea    0xebf(%rip),%rdi
lea    0x4(%rsp),%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
subl   $0x1,0x4(%rsp)
jae    116e <main+0x3e>
mov    0x2e82(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret
lea    0xe8b(%rip),%r14
lea    0xc(%rsp),%r15
lea    0x8(%rsp),%rbx
lea    0xe80(%rip),%r12
lea    0xe7d(%rip),%r13
jmp    11c4 <main+0x94>
nop
mov    %ecx,%eax
add    $0x1,%eax
shr    $0x1f,%eax
add    %ecx,%eax
add    $0x1,%eax
and    $0x7ffffffe,%eax
neg    %eax
add    %ecx,%eax
add    $0x1,%eax
add    %eax,%eax
lea    (%rax,%rcx,4),%esi
add    $0xfffffffe,%esi
sar    %esi
mov    %r12,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
subl   $0x1,0x4(%rsp)
jb     1157 <main+0x27>
mov    %r14,%rdi
mov    %r15,%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   1050 <scanf@plt>
mov    0x8(%rsp),%ecx
mov    0xc(%rsp),%eax
cmp    %eax,%ecx
je     1190 <main+0x60>
lea    -0x2(%rax),%edx
cmp    %edx,%ecx
jne    1210 <main+0xe0>
mov    %eax,%ecx
add    $0x1,%ecx
shr    $0x1f,%ecx
add    %eax,%ecx
add    $0x1,%ecx
and    $0x7ffffffe,%ecx
neg    %ecx
add    %eax,%ecx
add    $0x1,%ecx
add    %ecx,%ecx
lea    (%rcx,%rax,4),%esi
add    $0xfffffffa,%esi
jmp    11b1 <main+0x81>
nopl   0x0(%rax,%rax,1)
mov    %r13,%rdi
call   1030 <puts@plt>
subl   $0x1,0x4(%rsp)
jae    11c4 <main+0x94>
jmp    1157 <main+0x27>

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [6 x i8] c"%d %d\00"
@.str.2 = [4 x i8] c"%d\0A\00"
@EXIT_SUCCESS = global i32 0
@str = [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 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%10 = load i32, i32* %3
%11 = add nsw i32 %10, -1
store i32 %11, i32* %3
%12 = icmp eq i32 %10, 0
br i1 %12, label %45, label %13
13: ; preds = %2, %41
%14 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32* %4, i32* %5)
%15 = load i32, i32* %5
%16 = load i32, i32* %4
%17 = icmp eq i32 %15, %16
br i1 %17, label %18, label %27
18: ; preds = %13
%19 = shl nsw i32 %15, 2
%20 = add nsw i32 %15, 1
%21 = srem i32 %20, 2
%22 = shl nsw i32 %21, 1
%23 = add i32 %19, -2
%24 = add i32 %23, %22
%25 = sdiv i32 %24, 2
%26 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %25)
br label %41
27: ; preds = %13
%28 = add nsw i32 %16, -2
%29 = icmp eq i32 %15, %28
br i1 %29, label %30, label %39
30: ; preds = %27
%31 = shl nsw i32 %16, 2
%32 = add nsw i32 %16, 1
%33 = srem i32 %32, 2
%34 = shl nsw i32 %33, 1
%35 = add i32 %31, -6
%36 = add i32 %35, %34
%37 = sdiv i32 %36, 2
%38 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %37)
br label %41
39: ; preds = %27
%40 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str, i64 0, i64 0))
br label %41
41: ; preds = %30, %39, %18
%42 = load i32, i32* %3
%43 = add nsw i32 %42, -1
store i32 %43, i32* %3
%44 = icmp eq i32 %42, 0
br i1 %44, label %45, label %13
45: ; preds = %41, %2
%46 = load i32, i32* @EXIT_SUCCESS
ret i32 %46
}