#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 main() {
  int t, r, g, b, w, i, j = 0;
  char s[100];
  scanf("%d", &t);
  while (t--) {
    j = 0;
    scanf("%s", s);
    for (i = 0; s[i] != '\0'; i++)
      j = j ^ s[i];
    if (t > 0) {
      if (j == 0)
        printf("YES\n");
      else
        printf("NO\n");
    } else {
      if (j == 0)
        printf("YES");
      else
        printf("NO");
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x20(%rbp)
lea    0xec0(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x8(%rbp)
cmp    $0x0,%eax
je     1220 <main+0x100>
movl   $0x0,-0x20(%rbp)
lea    -0x90(%rbp),%rsi
lea    0xe8f(%rip),%rdi
mov    $0x0,%al
call   1040 <scanf@plt>
movl   $0x0,-0x1c(%rbp)
movslq -0x1c(%rbp),%rax
movsbl -0x90(%rbp,%rax,1),%eax
ff
cmp    $0x0,%eax
je     11b9 <main+0x99>
mov    -0x20(%rbp),%eax
movslq -0x1c(%rbp),%rcx
movsbl -0x90(%rbp,%rcx,1),%ecx
ff
xor    %ecx,%eax
mov    %eax,-0x20(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1182 <main+0x62>
cmpl   $0x0,-0x8(%rbp)
jle    11ef <main+0xcf>
cmpl   $0x0,-0x20(%rbp)
jne    11de <main+0xbe>
lea    0xe32(%rip),%rdi
call   1030 <printf@plt>
jmp    11ea <main+0xca>
lea    0xe26(%rip),%rdi
call   1030 <printf@plt>
jmp    121b <main+0xfb>
cmpl   $0x0,-0x20(%rbp)
jne    120a <main+0xea>
lea    0xe0f(%rip),%rdi
call   1030 <printf@plt>
jmp    1216 <main+0xf6>
lea    0xe02(%rip),%rdi
call   1030 <printf@plt>
jmp    121b <main+0xfb>
jmp    114b <main+0x2b>
xor    %eax,%eax
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x80,%rsp
lea    0xeb9(%rip),%rdi
lea    0xc(%rsp),%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
subl   $0x1,0xc(%rsp)
jb     11ef <main+0xbf>
lea    0x11(%rsp),%r13
lea    0xe99(%rip),%r14
lea    0x10(%rsp),%rbx
lea    0xe93(%rip),%r15
lea    0xe89(%rip),%r12
jmp    1196 <main+0x66>
nop
cmpl   $0x0,0xc(%rsp)
jle    11e0 <main+0xb0>
mov    %r15,%rdi
call   1030 <puts@plt>
subl   $0x1,0xc(%rsp)
jb     11ef <main+0xbf>
mov    %r14,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
mov    0x10(%rsp),%cl
test   %cl,%cl
je     1180 <main+0x50>
xor    %eax,%eax
mov    %r13,%rdx
movsbl %cl,%ecx
xor    %ecx,%eax
movzbl (%rdx),%ecx
add    $0x1,%rdx
test   %cl,%cl
jne    11b0 <main+0x80>
cmpl   $0x0,0xc(%rsp)
jle    11d0 <main+0xa0>
test   %eax,%eax
je     1187 <main+0x57>
mov    %r12,%rdi
jmp    118a <main+0x5a>
test   %eax,%eax
je     11e0 <main+0xb0>
mov    %r12,%rdi
jmp    11e3 <main+0xb3>
nopl   0x0(%rax)
mov    %r15,%rdi
call   1040 <printf@plt>
subl   $0x1,0xc(%rsp)
jae    1196 <main+0x66>
xor    %eax,%eax
add    $0x80,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [3 x i8] c"%s\00"
@str = [3 x i8] c"NO\00"
@str.6 = [4 x i8] c"YES\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [100 x i8]
%3 = bitcast i32* %1 to i8*
%4 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%5 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%6 = load i32, i32* %1
%7 = add nsw i32 %6, -1
store i32 %7, i32* %1
%8 = icmp eq i32 %6, 0
br i1 %8, label %44, label %9
9: ; preds = %0, %40
%10 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %4)
%11 = load i8, i8* %4
%12 = icmp eq i8 %11, 0
br i1 %12, label %27, label %13
13: ; preds = %9, %13
%14 = phi i64 [ %19, %13 ], [ 0, %9 ]
%15 = phi i8 [ %21, %13 ], [ %11, %9 ]
%16 = phi i32 [ %18, %13 ], [ 0, %9 ]
%17 = sext i8 %15 to i32
%18 = xor i32 %16, %17
%19 = add nuw nsw i64 %14, 1
%20 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 %19
%21 = load i8, i8* %20
%22 = icmp eq i8 %21, 0
br i1 %22, label %23, label %13
23: ; preds = %13
%24 = load i32, i32* %1
%25 = icmp sgt i32 %24, 0
%26 = icmp eq i32 %18, 0
br i1 %25, label %30, label %35
27: ; preds = %9
%28 = load i32, i32* %1
%29 = icmp sgt i32 %28, 0
br i1 %29, label %31, label %36
30: ; preds = %23
br i1 %26, label %31, label %33
31: ; preds = %27, %30
%32 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @str.6, i64 0, i64 0))
br label %40
33: ; preds = %30
%34 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @str, i64 0, i64 0))
br label %40
35: ; preds = %23
br i1 %26, label %36, label %38
36: ; preds = %27, %35
%37 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @str.6, i64 0, i64 0))
br label %40
38: ; preds = %35
%39 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @str, i64 0, i64 0))
br label %40
40: ; preds = %36, %38, %31, %33
%41 = load i32, i32* %1
%42 = add nsw i32 %41, -1
store i32 %42, i32* %1
%43 = icmp eq i32 %41, 0
br i1 %43, label %44, label %9
44: ; preds = %40, %0
ret i32 0
}