#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, ...);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int case_no, no = 1;
  int dash, ekka = 0, dokka = 2, a, b = 1;
  scanf("%d", &case_no);
  while (no <= case_no) {
    ekka = 0;
    dokka = 2;
    b = 1;
    scanf("%d", &dash);
    while (b != 0) {
      a = dash / dokka;
      if (a % 2 != 0 && (a * dokka) == dash) {
        ekka = a;
        printf("Case %d: %d %d\n", no, ekka, dokka);
        b = 0;
      } else if (dokka >= (dash / 2)) {
        printf("Case %d: Impossible\n", no);
        b = 0;
      }
      dokka = dokka + 2;
    }
    no++;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0xc(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x2,-0x18(%rbp)
movl   $0x1,-0x20(%rbp)
lea    0xeae(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     1244 <main+0x124>
movl   $0x0,-0x14(%rbp)
movl   $0x2,-0x18(%rbp)
movl   $0x1,-0x20(%rbp)
lea    0xe7d(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <scanf@plt>
cmpl   $0x0,-0x20(%rbp)
je     1236 <main+0x116>
mov    -0x10(%rbp),%eax
cltd
idivl  -0x18(%rbp)
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     11ed <main+0xcd>
mov    -0x1c(%rbp),%eax
imul   -0x18(%rbp),%eax
cmp    -0x10(%rbp),%eax
jne    11ed <main+0xcd>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0xc(%rbp),%esi
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
lea    0xe29(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x20(%rbp)
jmp    1228 <main+0x108>
mov    -0x18(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x10(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x24(%rbp),%eax
cmp    %ecx,%eax
jl     1223 <main+0x103>
mov    -0xc(%rbp),%esi
lea    0xdfe(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x20(%rbp)
jmp    1228 <main+0x108>
mov    -0x18(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x18(%rbp)
jmp    118c <main+0x6c>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    115b <main+0x3b>
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
lea    0xece(%rip),%rdi
mov    %rsp,%rsi
call   1040 <scanf@plt>
cmpl   $0x0,(%rsp)
jle    11fb <main+0xdb>
mov    $0x1,%ebp
lea    0xeb0(%rip),%r14
lea    0x4(%rsp),%r15
lea    0xea7(%rip),%r12
lea    0xeb0(%rip),%r13
jmp    1186 <main+0x66>
cs nopw 0x0(%rax,%rax,1)
nop
mov    %r13,%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x1(%rbp),%eax
cmp    (%rsp),%ebp
mov    %eax,%ebp
jge    11fb <main+0xdb>
mov    %r14,%rdi
mov    %r15,%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%esi
mov    %esi,%eax
shr    $0x1f,%eax
add    %esi,%eax
mov    %eax,%ebx
sar    %ebx
test   $0x1,%bl
je     11c0 <main+0xa0>
and    $0xfffffffe,%eax
cmp    %esi,%eax
jne    11c0 <main+0xa0>
mov    $0x2,%ecx
jmp    11eb <main+0xcb>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    $0x2,%ecx
cs nopw 0x0(%rax,%rax,1)
nop
cmp    %ebx,%ecx
jge    1170 <main+0x50>
add    $0x2,%ecx
mov    %esi,%eax
cltd
idiv   %ecx
test   $0x1,%al
je     11d0 <main+0xb0>
mov    %eax,%edx
imul   %ecx,%edx
cmp    %esi,%edx
jne    11d0 <main+0xb0>
mov    %eax,%ebx
mov    %r12,%rdi
mov    %ebp,%esi
mov    %ebx,%edx
xor    %eax,%eax
call   1030 <printf@plt>
jmp    117c <main+0x5c>
xor    %eax,%eax
add    $0x8,%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 = [16 x i8] c"Case %d: %d %d\0A\00"
@.str.2 = [21 x i8] c"Case %d: Impossible\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 0, i32* %1
store i32 1, i32* %3
store i32 0, i32* %5
store i32 2, i32* %6
store i32 1, i32* %8
%9 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
br label %10
10: ; preds = %50, %0
%11 = load i32, i32* %3
%12 = load i32, i32* %2
%13 = icmp sle i32 %11, %12
br i1 %13, label %14, label %53
14: ; preds = %10
store i32 0, i32* %5
store i32 2, i32* %6
store i32 1, i32* %8
%15 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %4)
br label %16
16: ; preds = %47, %14
%17 = load i32, i32* %8
%18 = icmp ne i32 %17, 0
br i1 %18, label %19, label %50
19: ; preds = %16
%20 = load i32, i32* %4
%21 = load i32, i32* %6
%22 = sdiv i32 %20, %21
store i32 %22, i32* %7
%23 = load i32, i32* %7
%24 = srem i32 %23, 2
%25 = icmp ne i32 %24, 0
br i1 %25, label %26, label %38
26: ; preds = %19
%27 = load i32, i32* %7
%28 = load i32, i32* %6
%29 = mul nsw i32 %27, %28
%30 = load i32, i32* %4
%31 = icmp eq i32 %29, %30
br i1 %31, label %32, label %38
32: ; preds = %26
%33 = load i32, i32* %7
store i32 %33, i32* %5
%34 = load i32, i32* %3
%35 = load i32, i32* %5
%36 = load i32, i32* %6
%37 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32 %34, i32 %35, i32 %36)
store i32 0, i32* %8
br label %47
38: ; preds = %26, %19
%39 = load i32, i32* %6
%40 = load i32, i32* %4
%41 = sdiv i32 %40, 2
%42 = icmp sge i32 %39, %41
br i1 %42, label %43, label %46
43: ; preds = %38
%44 = load i32, i32* %3
%45 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0), i32 %44)
store i32 0, i32* %8
br label %46
46: ; preds = %43, %38
br label %47
47: ; preds = %46, %32
%48 = load i32, i32* %6
%49 = add nsw i32 %48, 2
store i32 %49, i32* %6
br label %16
50: ; preds = %16
%51 = load i32, i32* %3
%52 = add nsw i32 %51, 1
store i32 %52, i32* %3
br label %10
53: ; preds = %10
%54 = load i32, i32* %1
ret i32 %54
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [16 x i8] c"Case %d: %d %d\0A\00"
@.str.2 = [21 x i8] c"Case %d: Impossible\0A\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 ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%6 = load i32, i32* %1
%7 = icmp slt i32 %6, 1
br i1 %7, label %40, label %8
8: ; preds = %0, %36
%9 = phi i32 [ %37, %36 ], [ 1, %0 ]
%10 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%11 = load i32, i32* %2
%12 = sdiv i32 %11, 2
%13 = sdiv i32 %11, 2
%14 = and i32 %13, 1
%15 = icmp ne i32 %14, 0
%16 = shl nsw i32 %13, 1
%17 = icmp eq i32 %16, %11
%18 = select i1 %15, i1 %17, i1 false
br i1 %18, label %19, label %23
19: ; preds = %28, %8
%20 = phi i32 [ 2, %8 ], [ %29, %28 ]
%21 = phi i32 [ %13, %8 ], [ %30, %28 ]
%22 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32 %9, i32 %21, i32 %20)
br label %36
23: ; preds = %8, %28
%24 = phi i32 [ %29, %28 ], [ 2, %8 ]
%25 = icmp slt i32 %24, %12
br i1 %25, label %28, label %26
26: ; preds = %23
%27 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0), i32 %9)
br label %36
28: ; preds = %23
%29 = add nuw nsw i32 %24, 2
%30 = sdiv i32 %11, %29
%31 = and i32 %30, 1
%32 = icmp ne i32 %31, 0
%33 = mul nsw i32 %30, %29
%34 = icmp eq i32 %33, %11
%35 = select i1 %32, i1 %34, i1 false
br i1 %35, label %19, label %23
36: ; preds = %26, %19
%37 = add nuw nsw i32 %9, 1
%38 = load i32, i32* %1
%39 = icmp slt i32 %9, %38
br i1 %39, label %8, label %40
40: ; preds = %36, %0
ret i32 0
}