#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, j, i, u[99], p = 0;
  char s[99];
  scanf("%d", &t);
  for (j = 0; j < t; j++) {
    scanf("%s", s);
    for (i = 0; s[i] != '\0'; i++) {
      u[i] = s[i];
      if (u[i] <= 122 && u[i] >= 43) {
        continue;
      } else
        p++;
    }
    if (p == 0)
      printf("YES\n");
    else
      printf("NO\n");
    p = 0;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x210,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x1a4(%rbp)
lea    0xebd(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1236 <main+0x116>
lea    -0x210(%rbp),%rsi
lea    0xe94(%rip),%rdi
mov    $0x0,%al
call   1040 <scanf@plt>
movl   $0x0,-0x10(%rbp)
movslq -0x10(%rbp),%rax
movsbl -0x210(%rbp,%rax,1),%eax
ff
cmp    $0x0,%eax
je     11f4 <main+0xd4>
movslq -0x10(%rbp),%rax
movsbl -0x210(%rbp,%rax,1),%ecx
ff
movslq -0x10(%rbp),%rax
mov    %ecx,-0x1a0(%rbp,%rax,4)
movslq -0x10(%rbp),%rax
cmpl   $0x7a,-0x1a0(%rbp,%rax,4)
7a
jg     11d2 <main+0xb2>
movslq -0x10(%rbp),%rax
cmpl   $0x2b,-0x1a0(%rbp,%rax,4)
2b
jl     11d2 <main+0xb2>
jmp    11e6 <main+0xc6>
mov    -0x1a4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1a4(%rbp)
jmp    11e6 <main+0xc6>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    117d <main+0x5d>
cmpl   $0x0,-0x1a4(%rbp)
jne    1212 <main+0xf2>
lea    0xdfe(%rip),%rdi
call   1030 <printf@plt>
jmp    121e <main+0xfe>
lea    0xdf2(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x1a4(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1155 <main+0x35>
xor    %eax,%eax
add    $0x210,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x78,%rsp
lea    0xecb(%rip),%rdi
lea    0xc(%rsp),%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
cmpl   $0x0,0xc(%rsp)
jle    11bd <main+0x9d>
lea    0x11(%rsp),%r15
lea    0xeaf(%rip),%r14
lea    0x10(%rsp),%r12
lea    0xea9(%rip),%rbx
lea    0xe9f(%rip),%r13
xor    %ebp,%ebp
jmp    117e <main+0x5e>
nopl   0x0(%rax,%rax,1)
call   1030 <puts@plt>
add    $0x1,%ebp
cmp    0xc(%rsp),%ebp
jge    11bd <main+0x9d>
mov    %r14,%rdi
mov    %r12,%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
mov    0x10(%rsp),%al
mov    %rbx,%rdi
test   %al,%al
je     1170 <main+0x50>
xor    %ecx,%ecx
mov    %r15,%rdx
nopl   0x0(%rax,%rax,1)
add    $0x85,%al
cmp    $0xb0,%al
adc    $0x0,%ecx
movzbl (%rdx),%eax
add    $0x1,%rdx
test   %al,%al
jne    11a0 <main+0x80>
test   %ecx,%ecx
mov    %r13,%rdi
cmove  %rbx,%rdi
jmp    1170 <main+0x50>
xor    %eax,%eax
add    $0x78,%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 = [3 x i8] c"%s\00"
@.str.2 = [5 x i8] c"YES\0A\00"
@.str.3 = [4 x i8] c"NO\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca [99 x i32]
%6 = alloca i32
%7 = alloca [99 x i8]
store i32 0, i32* %1
store i32 0, i32* %6
%8 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
store i32 0, i32* %3
br label %9
9: ; preds = %59, %0
%10 = load i32, i32* %3
%11 = load i32, i32* %2
%12 = icmp slt i32 %10, %11
br i1 %12, label %13, label %62
13: ; preds = %9
%14 = getelementptr inbounds [99 x i8], [99 x i8]* %7, i64 0, i64 0
%15 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %14)
store i32 0, i32* %4
br label %16
16: ; preds = %48, %13
%17 = load i32, i32* %4
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds [99 x i8], [99 x i8]* %7, i64 0, i64 %18
%20 = load i8, i8* %19
%21 = sext i8 %20 to i32
%22 = icmp ne i32 %21, 0
br i1 %22, label %23, label %51
23: ; preds = %16
%24 = load i32, i32* %4
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds [99 x i8], [99 x i8]* %7, i64 0, i64 %25
%27 = load i8, i8* %26
%28 = sext i8 %27 to i32
%29 = load i32, i32* %4
%30 = sext i32 %29 to i64
%31 = getelementptr inbounds [99 x i32], [99 x i32]* %5, i64 0, i64 %30
store i32 %28, i32* %31
%32 = load i32, i32* %4
%33 = sext i32 %32 to i64
%34 = getelementptr inbounds [99 x i32], [99 x i32]* %5, i64 0, i64 %33
%35 = load i32, i32* %34
%36 = icmp sle i32 %35, 122
br i1 %36, label %37, label %44
37: ; preds = %23
%38 = load i32, i32* %4
%39 = sext i32 %38 to i64
%40 = getelementptr inbounds [99 x i32], [99 x i32]* %5, i64 0, i64 %39
%41 = load i32, i32* %40
%42 = icmp sge i32 %41, 43
br i1 %42, label %43, label %44
43: ; preds = %37
br label %48
44: ; preds = %37, %23
%45 = load i32, i32* %6
%46 = add nsw i32 %45, 1
store i32 %46, i32* %6
br label %47
47: ; preds = %44
br label %48
48: ; preds = %47, %43
%49 = load i32, i32* %4
%50 = add nsw i32 %49, 1
store i32 %50, i32* %4
br label %16
51: ; preds = %16
%52 = load i32, i32* %6
%53 = icmp eq i32 %52, 0
br i1 %53, label %54, label %56
54: ; preds = %51
%55 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
br label %58
56: ; preds = %51
%57 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
br label %58
58: ; preds = %56, %54
store i32 0, i32* %6
br label %59
59: ; preds = %58
%60 = load i32, i32* %3
%61 = add nsw i32 %60, 1
store i32 %61, i32* %3
br label %9
62: ; preds = %9
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.4 = [4 x i8] c"YES\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [99 x i8]
%3 = bitcast i32* %1 to i8*
%4 = getelementptr inbounds [99 x i8], [99 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 = icmp sgt i32 %6, 0
br i1 %7, label %8, label %34
8: ; preds = %0, %28
%9 = phi i32 [ %31, %28 ], [ 0, %0 ]
%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 %28, label %13
13: ; preds = %8, %13
%14 = phi i64 [ %21, %13 ], [ 0, %8 ]
%15 = phi i8 [ %23, %13 ], [ %11, %8 ]
%16 = phi i32 [ %20, %13 ], [ 0, %8 ]
%17 = add i8 %15, -123
%18 = icmp ult i8 %17, -80
%19 = zext i1 %18 to i32
%20 = add nuw nsw i32 %16, %19
%21 = add nuw nsw i64 %14, 1
%22 = getelementptr inbounds [99 x i8], [99 x i8]* %2, i64 0, i64 %21
%23 = load i8, i8* %22
%24 = icmp eq i8 %23, 0
br i1 %24, label %25, label %13
25: ; preds = %13
%26 = icmp eq i32 %20, 0
%27 = select i1 %26, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @str.4, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @str, i64 0, i64 0)
br label %28
28: ; preds = %25, %8
%29 = phi i8* [ getelementptr inbounds ([4 x i8], [4 x i8]* @str.4, i64 0, i64 0), %8 ], [ %27, %25 ]
%30 = call i32 @puts(i8* dereferenceable(1) %29)
%31 = add nuw nsw i32 %9, 1
%32 = load i32, i32* %1
%33 = icmp slt i32 %31, %32
br i1 %33, label %8, label %34
34: ; preds = %28, %0
ret i32 0
}