#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*/ fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, ...);
int removeSpace(char *, char *);
int /*<<< orphan*/ scanf(char *, int *);
int /*<<< orphan*/ stdin;
scalar_t__ strcmp(char *, char *);
int strlen(char *);
int main(void) {
  int T, caseId, hasSpace, len;
  char judgeStr[100 + 2], userAns[100 + 2], userNoSpaceAns[100 + 2],
      trash[100 + 2];
  scanf("%d", &T);
  fgets(trash, 100 + 2, stdin);
  caseId = 1;
  while (caseId <= T) {
    fgets(userAns, 100 + 2, stdin);
    len = strlen(userAns);
    if (userAns[len - 1] == '\n') {
      userAns[len - 1] = '\0';
      len--;
    }
    fgets(judgeStr, 100 + 2, stdin);
    len = strlen(judgeStr);
    if (judgeStr[len - 1] == '\n') {
      judgeStr[len - 1] = '\0';
      len--;
    }
    hasSpace = removeSpace(userAns, userNoSpaceAns);
    printf("Case %d: ", caseId);
    if (strcmp(judgeStr, userNoSpaceAns) == 0) {
      if (hasSpace)
        printf("Output Format Error\n");
      else
        printf("Yes\n");
    } else
      printf("Wrong Answer\n");
    caseId++;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1d0,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xe87(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1070 <scanf@plt>
lea    -0x1d0(%rbp),%rdi
mov    0x2e58(%rip),%rax
mov    (%rax),%edx
mov    $0x66,%esi
call   1050 <fgets@plt>
movl   $0x1,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     12e6 <main+0x186>
lea    -0xf0(%rbp),%rdi
mov    0x2e2b(%rip),%rax
mov    (%rax),%edx
mov    $0x66,%esi
call   1050 <fgets@plt>
lea    -0xf0(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
sub    $0x1,%eax
cltq
movsbl -0xf0(%rbp,%rax,1),%eax
ff
cmp    $0xa,%eax
jne    120a <main+0xaa>
mov    -0x14(%rbp),%eax
sub    $0x1,%eax
cltq
movb   $0x0,-0xf0(%rbp,%rax,1)
mov    -0x14(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
lea    -0x80(%rbp),%rdi
mov    0x2dd3(%rip),%rax
mov    (%rax),%edx
mov    $0x66,%esi
call   1050 <fgets@plt>
lea    -0x80(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
sub    $0x1,%eax
cltq
movsbl -0x80(%rbp,%rax,1),%eax
cmp    $0xa,%eax
jne    1259 <main+0xf9>
mov    -0x14(%rbp),%eax
sub    $0x1,%eax
cltq
movb   $0x0,-0x80(%rbp,%rax,1)
mov    -0x14(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
lea    -0xf0(%rbp),%rdi
lea    -0x160(%rbp),%rsi
call   1080 <removeSpace@plt>
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%esi
lea    0xd8a(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x80(%rbp),%rdi
lea    -0x160(%rbp),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
jne    12ca <main+0x16a>
cmpl   $0x0,-0x10(%rbp)
je     12b7 <main+0x157>
lea    0xd62(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    12c5 <main+0x165>
lea    0xd64(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    12d8 <main+0x178>
lea    0xd56(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    11a3 <main+0x43>
xor    %eax,%eax
add    $0x1d0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x1c8,%rsp
lea    0xe78(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1080 <scanf@plt>
mov    0x2e4f(%rip),%r12
mov    (%r12),%edx
lea    0xf0(%rsp),%rdi
mov    $0x66,%esi
call   1060 <fgets@plt>
cmpl   $0x0,0xc(%rsp)
jle    1291 <main+0x121>
lea    0x10(%rsp),%r14
lea    0x80(%rsp),%r13
lea    0x160(%rsp),%r15
xor    %ebp,%ebp
jmp    1235 <main+0xc5>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %r14,%rdi
mov    %r15,%rsi
call   1090 <removeSpace@plt>
mov    %eax,%ebx
lea    0xe0f(%rip),%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r13,%rdi
mov    %r15,%rsi
call   1070 <strcmp@plt>
test   %ebx,%ebx
lea    0xe0d(%rip),%rdi
lea    0xe02(%rip),%rcx
cmove  %rcx,%rdi
test   %rax,%rax
lea    0xde7(%rip),%rax
cmovne %rax,%rdi
call   1030 <puts@plt>
cmp    0xc(%rsp),%ebp
jge    1291 <main+0x121>
mov    (%r12),%edx
mov    %r14,%rdi
mov    $0x66,%esi
call   1060 <fgets@plt>
mov    %r14,%rdi
call   1040 <strlen@plt>
cltq
cmpb   $0xa,-0x1(%rax,%r14,1)
jne    125d <main+0xed>
movb   $0x0,0xf(%rsp,%rax,1)
add    $0x1,%ebp
mov    (%r12),%edx
mov    %r13,%rdi
mov    $0x66,%esi
call   1060 <fgets@plt>
mov    %r13,%rdi
call   1040 <strlen@plt>
cltq
cmpb   $0xa,-0x1(%rax,%r13,1)
jne    11e0 <main+0x70>
movb   $0x0,0x7f(%rsp,%rax,1)
jmp    11e0 <main+0x70>
xor    %eax,%eax
add    $0x1c8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@stdin = global i32 0
@.str.1 = [10 x i8] c"Case %d: \00"
@.str.2 = [21 x i8] c"Output Format Error\0A\00"
@.str.3 = [5 x i8] c"Yes\0A\00"
@.str.4 = [14 x i8] c"Wrong Answer\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca [102 x i8]
%7 = alloca [102 x i8]
%8 = alloca [102 x i8]
%9 = alloca [102 x i8]
store i32 0, i32* %1
%10 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%11 = getelementptr inbounds [102 x i8], [102 x i8]* %9, i64 0, i64 0
%12 = load i32, i32* @stdin
%13 = call i32 @fgets(i8* %11, i32 102, i32 %12)
store i32 1, i32* %3
br label %14
14: ; preds = %78, %0
%15 = load i32, i32* %3
%16 = load i32, i32* %2
%17 = icmp sle i32 %15, %16
br i1 %17, label %18, label %81
18: ; preds = %14
%19 = getelementptr inbounds [102 x i8], [102 x i8]* %7, i64 0, i64 0
%20 = load i32, i32* @stdin
%21 = call i32 @fgets(i8* %19, i32 102, i32 %20)
%22 = getelementptr inbounds [102 x i8], [102 x i8]* %7, i64 0, i64 0
%23 = call i32 @strlen(i8* %22)
store i32 %23, i32* %5
%24 = load i32, i32* %5
%25 = sub nsw i32 %24, 1
%26 = sext i32 %25 to i64
%27 = getelementptr inbounds [102 x i8], [102 x i8]* %7, i64 0, i64 %26
%28 = load i8, i8* %27
%29 = sext i8 %28 to i32
%30 = icmp eq i32 %29, 10
br i1 %30, label %31, label %38
31: ; preds = %18
%32 = load i32, i32* %5
%33 = sub nsw i32 %32, 1
%34 = sext i32 %33 to i64
%35 = getelementptr inbounds [102 x i8], [102 x i8]* %7, i64 0, i64 %34
store i8 0, i8* %35
%36 = load i32, i32* %5
%37 = add nsw i32 %36, -1
store i32 %37, i32* %5
br label %38
38: ; preds = %31, %18
%39 = getelementptr inbounds [102 x i8], [102 x i8]* %6, i64 0, i64 0
%40 = load i32, i32* @stdin
%41 = call i32 @fgets(i8* %39, i32 102, i32 %40)
%42 = getelementptr inbounds [102 x i8], [102 x i8]* %6, i64 0, i64 0
%43 = call i32 @strlen(i8* %42)
store i32 %43, i32* %5
%44 = load i32, i32* %5
%45 = sub nsw i32 %44, 1
%46 = sext i32 %45 to i64
%47 = getelementptr inbounds [102 x i8], [102 x i8]* %6, i64 0, i64 %46
%48 = load i8, i8* %47
%49 = sext i8 %48 to i32
%50 = icmp eq i32 %49, 10
br i1 %50, label %51, label %58
51: ; preds = %38
%52 = load i32, i32* %5
%53 = sub nsw i32 %52, 1
%54 = sext i32 %53 to i64
%55 = getelementptr inbounds [102 x i8], [102 x i8]* %6, i64 0, i64 %54
store i8 0, i8* %55
%56 = load i32, i32* %5
%57 = add nsw i32 %56, -1
store i32 %57, i32* %5
br label %58
58: ; preds = %51, %38
%59 = getelementptr inbounds [102 x i8], [102 x i8]* %7, i64 0, i64 0
%60 = getelementptr inbounds [102 x i8], [102 x i8]* %8, i64 0, i64 0
%61 = call i32 @removeSpace(i8* %59, i8* %60)
store i32 %61, i32* %4
%62 = load i32, i32* %3
%63 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 %62)
%64 = getelementptr inbounds [102 x i8], [102 x i8]* %6, i64 0, i64 0
%65 = getelementptr inbounds [102 x i8], [102 x i8]* %8, i64 0, i64 0
%66 = call i64 @strcmp(i8* %64, i8* %65)
%67 = icmp eq i64 %66, 0
br i1 %67, label %68, label %76
68: ; preds = %58
%69 = load i32, i32* %4
%70 = icmp ne i32 %69, 0
br i1 %70, label %71, label %73
71: ; preds = %68
%72 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0))
br label %75
73: ; preds = %68
%74 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
br label %75
75: ; preds = %73, %71
br label %78
76: ; preds = %58
%77 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0))
br label %78
78: ; preds = %76, %75
%79 = load i32, i32* %3
%80 = add nsw i32 %79, 1
store i32 %80, i32* %3
br label %14
81: ; preds = %14
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@stdin = global i32 0
@.str.1 = [10 x i8] c"Case %d: \00"
@str = [13 x i8] c"Wrong Answer\00"
@str.5 = [4 x i8] c"Yes\00"
@str.6 = [20 x i8] c"Output Format Error\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [102 x i8]
%3 = alloca [102 x i8]
%4 = alloca [102 x i8]
%5 = alloca [102 x i8]
%6 = bitcast i32* %1 to i8*
%7 = getelementptr inbounds [102 x i8], [102 x i8]* %2, i64 0, i64 0
%8 = getelementptr inbounds [102 x i8], [102 x i8]* %3, i64 0, i64 0
%9 = getelementptr inbounds [102 x i8], [102 x i8]* %4, i64 0, i64 0
%10 = getelementptr inbounds [102 x i8], [102 x i8]* %5, i64 0, i64 0
%11 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%12 = load i32, i32* @stdin
%13 = call i32 @fgets(i8* %10, i32 102, i32 %12)
%14 = load i32, i32* %1
%15 = icmp slt i32 %14, 1
br i1 %15, label %49, label %16
16: ; preds = %0, %37
%17 = phi i32 [ %46, %37 ], [ 1, %0 ]
%18 = load i32, i32* @stdin
%19 = call i32 @fgets(i8* %8, i32 102, i32 %18)
%20 = call i32 @strlen(i8* %8)
%21 = add nsw i32 %20, -1
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds [102 x i8], [102 x i8]* %3, i64 0, i64 %22
%24 = load i8, i8* %23
%25 = icmp eq i8 %24, 10
br i1 %25, label %26, label %27
26: ; preds = %16
store i8 0, i8* %23
br label %27
27: ; preds = %26, %16
%28 = load i32, i32* @stdin
%29 = call i32 @fgets(i8* %7, i32 102, i32 %28)
%30 = call i32 @strlen(i8* %7)
%31 = add nsw i32 %30, -1
%32 = sext i32 %31 to i64
%33 = getelementptr inbounds [102 x i8], [102 x i8]* %2, i64 0, i64 %32
%34 = load i8, i8* %33
%35 = icmp eq i8 %34, 10
br i1 %35, label %36, label %37
36: ; preds = %27
store i8 0, i8* %33
br label %37
37: ; preds = %36, %27
%38 = call i32 @removeSpace(i8* %8, i8* %9)
%39 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 %17)
%40 = call i64 @strcmp(i8* %7, i8* %9)
%41 = icmp eq i64 %40, 0
%42 = icmp eq i32 %38, 0
%43 = select i1 %42, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @str.5, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @str.6, i64 0, i64 0)
%44 = select i1 %41, i8* %43, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0)
%45 = call i32 @puts(i8* dereferenceable(1) %44)
%46 = add nuw nsw i32 %17, 1
%47 = load i32, i32* %1
%48 = icmp slt i32 %17, %47
br i1 %48, label %16, label %49
49: ; preds = %37, %0
ret i32 0
}