#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 *, long long, long long);
int /*<<< orphan*/ scanf(char *, long long *);
int main() {
  int i;
  for (i = 0; i < 10; ++i) {
    long long total, dif;
    scanf("%llu", &total);
    scanf("%llu", &dif);
    long long y = (total - dif) / 2;
    long long x = y + 2;
    printf("%llu\n%llu\n", x, y);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jge    11a4 <main+0x84>
lea    0xeb9(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xea9(%rip),%rdi
lea    -0x18(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x10(%rbp),%rax
sub    -0x18(%rbp),%rax
mov    $0x2,%ecx
cqto
idiv   %rcx
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
add    $0x2,%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rsi
mov    -0x20(%rbp),%rdx
lea    0xe74(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1136 <main+0x16>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x10,%rsp
mov    $0xa,%ebp
lea    0xec8(%rip),%rbx
lea    0x8(%rsp),%r14
mov    %rsp,%r15
lea    0xebe(%rip),%r12
nopw   0x0(%rax,%rax,1)
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <scanf@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
call   1040 <scanf@plt>
mov    0x8(%rsp),%rax
sub    (%rsp),%rax
mov    %rax,%rdx
shr    $0x3f,%rdx
add    %rax,%rdx
sar    %rdx
lea    0x2(%rdx),%rsi
mov    %r12,%rdi
call   1030 <printf@plt>
add    $0xffffffff,%ebp
jne    1150 <main+0x30>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [5 x i8] c"%llu\00"
@.str.1 = [11 x i8] c"%llu\0A%llu\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
store i32 0, i32* %1
store i32 0, i32* %2
br label %7
7: ; preds = %22, %0
%8 = load i32, i32* %2
%9 = icmp slt i32 %8, 10
br i1 %9, label %10, label %25
10: ; preds = %7
%11 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64* %3)
%12 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64* %4)
%13 = load i64, i64* %3
%14 = load i64, i64* %4
%15 = sub nsw i64 %13, %14
%16 = sdiv i64 %15, 2
store i64 %16, i64* %5
%17 = load i64, i64* %5
%18 = add nsw i64 %17, 2
store i64 %18, i64* %6
%19 = load i64, i64* %6
%20 = load i64, i64* %5
%21 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i64 %19, i64 %20)
br label %22
22: ; preds = %10
%23 = load i32, i32* %2
%24 = add nsw i32 %23, 1
store i32 %24, i32* %2
br label %7
25: ; preds = %7
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"%llu\00"
@.str.1 = [11 x i8] c"%llu\0A%llu\0A\00"
define i32 @main() {
%1 = alloca i64
%2 = alloca i64
%3 = bitcast i64* %1 to i8*
%4 = bitcast i64* %2 to i8*
br label %5
5: ; preds = %0, %5
%6 = phi i32 [ 0, %0 ], [ %15, %5 ]
%7 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64* %1)
%8 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64* %2)
%9 = load i64, i64* %1
%10 = load i64, i64* %2
%11 = sub nsw i64 %9, %10
%12 = sdiv i64 %11, 2
%13 = add nsw i64 %12, 2
%14 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i64 %13, i64 %12)
%15 = add nuw nsw i32 %6, 1
%16 = icmp eq i32 %15, 10
br i1 %16, label %17, label %5
17: ; preds = %5
ret i32 0
}