#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 main() {
  int t, arr[100000], sum, r, i, N, n, rare;
  scanf("%d", &t);
  while (t--) {
    sum = rare = r = 0;
    scanf("%d", &N);
    for (i = 0; i < N; i++) {
      scanf("%d", &arr[i]);
      sum += arr[i];
      if (arr[i] > 100)
        rare = 1;
      if (arr[i] == 0)
        r++;
    }
    if (rare) {
      printf("\nNO");
      continue;
    }
    if (sum >= 100 && sum <= (99 + N - r)) {
      printf("\nYES");
    } else {
      printf("\nNO");
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x61ab0,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xec7(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x8(%rbp)
cmp    $0x0,%eax
je     12a4 <main+0x184>
movl   $0x0,-0x61a98(%rbp)
movl   $0x0,-0x61aa8(%rbp)
movl   $0x0,-0x61a94(%rbp)
lea    0xe85(%rip),%rdi
lea    -0x61aa0(%rbp),%rsi
call   1040 <scanf@plt>
movl   $0x0,-0x61a9c(%rbp)
mov    -0x61a9c(%rbp),%eax
cmp    -0x61aa0(%rbp),%eax
jge    123a <main+0x11a>
movslq -0x61a9c(%rbp),%rax
lea    -0x61a90(%rbp),%rsi
shl    $0x2,%rax
add    %rax,%rsi
lea    0xe41(%rip),%rdi
call   1040 <scanf@plt>
movslq -0x61a9c(%rbp),%rax
mov    -0x61a90(%rbp,%rax,4),%eax
add    -0x61a94(%rbp),%eax
mov    %eax,-0x61a94(%rbp)
movslq -0x61a9c(%rbp),%rax
cmpl   $0x64,-0x61a90(%rbp,%rax,4)
64
jle    11fd <main+0xdd>
movl   $0x1,-0x61aa8(%rbp)
movslq -0x61a9c(%rbp),%rax
cmpl   $0x0,-0x61a90(%rbp,%rax,4)
jne    1221 <main+0x101>
mov    -0x61a98(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x61a98(%rbp)
jmp    1226 <main+0x106>
mov    -0x61a9c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x61a9c(%rbp)
jmp    1191 <main+0x71>
cmpl   $0x0,-0x61aa8(%rbp)
je     1258 <main+0x138>
lea    0xdb5(%rip),%rdi
call   1030 <printf@plt>
jmp    1142 <main+0x22>
cmpl   $0x64,-0x61a94(%rbp)
jl     1293 <main+0x173>
mov    -0x61a94(%rbp),%eax
mov    -0x61aa0(%rbp),%ecx
add    $0x63,%ecx
sub    -0x61a98(%rbp),%ecx
cmp    %ecx,%eax
jg     1293 <main+0x173>
lea    0xd7e(%rip),%rdi
call   1030 <printf@plt>
jmp    129f <main+0x17f>
lea    0xd69(%rip),%rdi
call   1030 <printf@plt>
jmp    1142 <main+0x22>
xor    %eax,%eax
add    $0x61ab0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x61a98,%rsp
lea    0xec8(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1040 <scanf@plt>
subl   $0x1,0xc(%rsp)
jae    115d <main+0x3d>
xor    %eax,%eax
add    $0x61a98,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xe9c(%rip),%r15
jmp    1183 <main+0x63>
cs nopw 0x0(%rax,%rax,1)
lea    0xe8c(%rip),%rdi
call   1030 <printf@plt>
subl   $0x1,0xc(%rsp)
jb     1149 <main+0x29>
mov    %r15,%rdi
lea    0x8(%rsp),%rsi
call   1040 <scanf@plt>
cmpl   $0x0,0x8(%rsp)
jle    1170 <main+0x50>
xor    %r13d,%r13d
lea    0x10(%rsp),%rbx
xor    %ebp,%ebp
xor    %r12d,%r12d
xor    %r14d,%r14d
nopw   0x0(%rax,%rax,1)
mov    %r15,%rdi
mov    %rbx,%rsi
call   1040 <scanf@plt>
mov    (%rbx),%eax
add    %eax,%r12d
cmp    $0x65,%eax
mov    $0x1,%ecx
cmovge %ecx,%ebp
cmp    $0x1,%eax
adc    $0x0,%r14d
add    $0x1,%r13
movslq 0x8(%rsp),%rax
add    $0x4,%rbx
cmp    %rax,%r13
jl     11b0 <main+0x90>
lea    0xe18(%rip),%rdi
test   %ebp,%ebp
jne    1177 <main+0x57>
cmp    $0x64,%r12d
jl     1170 <main+0x50>
sub    %r14d,%eax
add    $0x63,%eax
lea    0xe01(%rip),%rdi
cmp    %eax,%r12d
jg     1170 <main+0x50>
jmp    1177 <main+0x57>

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"\0ANO\00"
@.str.2 = [5 x i8] c"\0AYES\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [100000 x i32]
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
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)
br label %11
11: ; preds = %70, %54, %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 %71
15: ; preds = %11
store i32 0, i32* %5
store i32 0, i32* %9
store i32 0, i32* %4
%16 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %7)
store i32 0, i32* %6
br label %17
17: ; preds = %48, %15
%18 = load i32, i32* %6
%19 = load i32, i32* %7
%20 = icmp slt i32 %18, %19
br i1 %20, label %21, label %51
21: ; preds = %17
%22 = load i32, i32* %6
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds [100000 x i32], [100000 x i32]* %3, i64 0, i64 %23
%25 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %24)
%26 = load i32, i32* %6
%27 = sext i32 %26 to i64
%28 = getelementptr inbounds [100000 x i32], [100000 x i32]* %3, i64 0, i64 %27
%29 = load i32, i32* %28
%30 = load i32, i32* %4
%31 = add nsw i32 %30, %29
store i32 %31, i32* %4
%32 = load i32, i32* %6
%33 = sext i32 %32 to i64
%34 = getelementptr inbounds [100000 x i32], [100000 x i32]* %3, i64 0, i64 %33
%35 = load i32, i32* %34
%36 = icmp sgt i32 %35, 100
br i1 %36, label %37, label %38
37: ; preds = %21
store i32 1, i32* %9
br label %38
38: ; preds = %37, %21
%39 = load i32, i32* %6
%40 = sext i32 %39 to i64
%41 = getelementptr inbounds [100000 x i32], [100000 x i32]* %3, i64 0, i64 %40
%42 = load i32, i32* %41
%43 = icmp eq i32 %42, 0
br i1 %43, label %44, label %47
44: ; preds = %38
%45 = load i32, i32* %5
%46 = add nsw i32 %45, 1
store i32 %46, i32* %5
br label %47
47: ; preds = %44, %38
br label %48
48: ; preds = %47
%49 = load i32, i32* %6
%50 = add nsw i32 %49, 1
store i32 %50, i32* %6
br label %17
51: ; preds = %17
%52 = load i32, i32* %9
%53 = icmp ne i32 %52, 0
br i1 %53, label %54, label %56
54: ; preds = %51
%55 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
br label %11
56: ; preds = %51
%57 = load i32, i32* %4
%58 = icmp sge i32 %57, 100
br i1 %58, label %59, label %68
59: ; preds = %56
%60 = load i32, i32* %4
%61 = load i32, i32* %7
%62 = add nsw i32 99, %61
%63 = load i32, i32* %5
%64 = sub nsw i32 %62, %63
%65 = icmp sle i32 %60, %64
br i1 %65, label %66, label %68
66: ; preds = %59
%67 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
br label %70
68: ; preds = %59, %56
%69 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
br label %70
70: ; preds = %68, %66
br label %11
71: ; preds = %11
ret i32 0
}

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