#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 *);
int main() {
  int a, b, n, m;
  scanf("%d%d", &n, &m);
  a = (4 * n - m) / 2;
  b = n - a;
  if (m % 2 == 1 || a < 0 || b < 0)
    printf("No answer\n");
  else
    printf("%d %d\n", a, b);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x10(%rbp),%rsi
lea    -0x14(%rbp),%rdx
call   1040 <scanf@plt>
mov    -0x10(%rbp),%eax
shl    $0x2,%eax
sub    -0x14(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x8(%rbp)
mov    -0x10(%rbp),%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x14(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x1,%edx
je     1188 <main+0x68>
cmpl   $0x0,-0x8(%rbp)
jl     1188 <main+0x68>
cmpl   $0x0,-0xc(%rbp)
jge    119b <main+0x7b>
lea    0xe76(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11af <main+0x8f>
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xe68(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1050 <scanf@plt>
mov    (%rsp),%eax
mov    %eax,%ecx
shr    $0x1f,%ecx
add    %eax,%ecx
and    $0xfffffffe,%ecx
mov    %eax,%edx
sub    %ecx,%edx
cmp    $0x1,%edx
je     118a <main+0x5a>
mov    0x4(%rsp),%edx
lea    0x0(,%rdx,4),%ecx
sub    %eax,%ecx
cmp    $0xffffffff,%ecx
jl     118a <main+0x5a>
mov    %ecx,%esi
shr    $0x1f,%esi
add    %ecx,%esi
sar    %esi
sub    %esi,%edx
js     118a <main+0x5a>
lea    0xe84(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
jmp    1196 <main+0x66>
lea    0xe7b(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [5 x i8] c"%d%d\00"
@.str.2 = [7 x i8] c"%d %d\0A\00"
@str = [10 x i8] c"No answer\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2)
%6 = load i32, i32* %1
%7 = shl nsw i32 %6, 2
%8 = load i32, i32* %2
%9 = sub nsw i32 %7, %8
%10 = sdiv i32 %9, 2
%11 = sub nsw i32 %6, %10
%12 = srem i32 %8, 2
%13 = icmp eq i32 %12, 1
%14 = icmp slt i32 %9, -1
%15 = select i1 %13, i1 true, i1 %14
%16 = icmp slt i32 %11, 0
%17 = select i1 %15, i1 true, i1 %16
br i1 %17, label %18, label %20
18: ; preds = %0
%19 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str, i64 0, i64 0))
br label %22
20: ; preds = %0
%21 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i32 %10, i32 %11)
br label %22
22: ; preds = %20, %18
ret i32 0
}