description: You are given a sequence of n integers a_1,   a_2,   ...,   a_n.
  
  Does there exist a sequence of n integers b_1,   b_2,   ...,   b_n such that the following property holds?
  
    * For each 1 ≤ i ≤ n, there exist two (not necessarily distinct) indices j and k (1 ≤ j,   k ≤ n) such that a_i = b_j - b_k. 
  
  Input
  
  The first line contains a single integer t (1 ≤ t ≤ 20) — the number of test cases. Then t test cases follow.
  
  The first line of each test case contains one integer n (1 ≤ n ≤ 10).
  
  The second line of each test case contains the n integers a_1,   ...,   a_n (-10^5 ≤ a_i ≤ 10^5).
  
  Output
  
  For each test case, output a line containing YES if a sequence b_1,   ...,   b_n satisfying the required property exists, and NO otherwise.
  
  Example
  
  Input
  
  
  5
  5
  4 -7 -1 5 10
  1
  0
  3
  1 10 100
  4
  -3 2 10 2
  9
  25 -171 250 174 152 242 100 -205 -258
  
  
  Output
  
  
  YES
  YES
  NO
  YES
  YES
  
  Note
  
  In the first test case, the sequence b = [-9,   2,   1,   3,   -2] satisfies the property. Indeed, the following holds: 
  
    * a_1 = 4 = 2 - (-2) = b_2 - b_5; 
    * a_2 = -7 = -9 - (-2) = b_1 - b_5; 
    * a_3 = -1 = 1 - 2 = b_3 - b_2; 
    * a_4 = 5 = 3 - (-2) = b_4 - b_5; 
    * a_5 = 10 = 1 - (-9) = b_3 - b_1. 
  
  
  
  In the second test case, it is sufficient to choose b = [0], since a_1 = 0 = 0 - 0 = b_1 - b_1.
  
  In the third test case, it is possible to show that no sequence b of length 3 satisfies the property.
solution: 
  import java.io.*;
  import java.util.*;
  
  public class ArrayDifferentiation implements Runnable {
  
     void solve() {
        int t = ri();
        outer: while (t-- > 0) {
           int n = ri();
           int[] arr = iArr(n);
           for (int i = 0; i < n; i++) {
              arr[i] = ri();
           }
  
  //         if (n == 1 && ) {
  //            println("YES");
  //            continue;
  //         }
           int sum = 0;
           Set<Integer> set = new HashSet<Integer>();
           for (int i = 0; i < (1 << n); i++) {
              // Go through all the subsets possible
              sum = 0;
              for (int j = 0; j < n; j++) {
                 if ((i & (1 << j)) != 0) {
                    sum += arr[j];
                 }
              }
              if (set.contains(sum)) {
                 // It is possible to make sequence
                 println("YES");
                 continue outer;
              }
              set.add(sum);
           }
           println("NO");
        }
     }
  
     /************************************************************************************************************************************************/
     public static void main(String[] args) throws IOException {
        new Thread(null, new ArrayDifferentiation(), "1").start();
     }
  
     static PrintWriter out = new PrintWriter(System.out);
     static Reader read = new Reader();
     static StringBuilder sbr = new StringBuilder();
     static int mod = (int) 1e9 + 7;
     static int dmax = Integer.MAX_VALUE;
     static long lmax = Long.MAX_VALUE;
     static int dmin = Integer.MIN_VALUE;
     static long lmin = Long.MIN_VALUE;
     static int[] dprimes = new int[] { 1, 11, 101, 1087, 99991, 100001, 1000003, 15485863, 999999937 };
  
     @Override
     public void run() {
        solve();
        out.close();
     }
  
     static class Reader {
        private byte[] buf = new byte[1024];
        private int index;
        private InputStream in;
        private int total;
  
        public Reader() {
           in = System.in;
        }
  
        public int scan() throws IOException {
           if (total < 0)
              throw new InputMismatchException();
           if (index >= total) {
              index = 0;
              total = in.read(buf);
              if (total <= 0)
                 return -1;
           }
           return buf[index++];
        }
  
        public int intNext() throws IOException {
           int integer = 0;
           int n = scan();
           while (isWhiteSpace(n))
              n = scan();
           int neg = 1;
           if (n == '-') {
              neg = -1;
              n = scan();
           }
           while (!isWhiteSpace(n)) {
              if (n >= '0' && n <= '9') {
                 integer *= 10;
                 integer += n - '0';
                 n = scan();
              } else
                 throw new InputMismatchException();
           }
           return neg * integer;
        }
  
        public double doubleNext() throws IOException {
           double doub = 0;
           int n = scan();
           while (isWhiteSpace(n))
              n = scan();
           int neg = 1;
           if (n == '-') {
              neg = -1;
              n = scan();
           }
           while (!isWhiteSpace(n) && n != '.') {
              if (n >= '0' && n <= '9') {
                 doub *= 10;
                 doub += n - '0';
                 n = scan();
              } else
                 throw new InputMismatchException();
           }
           if (n == '.') {
              n = scan();
              double temp = 1;
              while (!isWhiteSpace(n)) {
                 if (n >= '0' && n <= '9') {
                    temp /= 10;
                    doub += (n - '0') * temp;
                    n = scan();
                 } else
                    throw new InputMismatchException();
              }
           }
           return doub * neg;
        }
  
        public String read() throws IOException {
           StringBuilder sb = new StringBuilder();
           int n = scan();
           while (isWhiteSpace(n))
              n = scan();
           while (!isWhiteSpace(n)) {
              sb.append((char) n);
              n = scan();
           }
           return sb.toString();
        }
  
        public String rline() throws IOException {
           StringBuilder sb = new StringBuilder();
           int n = scan();
           while (n != '\n') {
              sb.append((char) n);
              n = scan();
           }
           return sb.toString();
        }
  
        private boolean isWhiteSpace(int n) {
           if (n == ' ' || n == '\n' || n == '\r' || n == '\t' || n == -1)
              return true;
           return false;
        }
     }
  
     static void print(Object object) {
        out.print(object);
     }
  
     static void println(Object object) {
        out.println(object);
     }
  
     static int[] iArr(int len) {
        return new int[len];
     }
  
     static long[] lArr(int len) {
        return new long[len];
     }
  
     static long min(long a, long b) {
        return Math.min(a, b);
     }
  
     static int min(int a, int b) {
        return Math.min(a, b);
     }
  
     static long max(Long a, Long b) {
        return Math.max(a, b);
     }
  
     static int max(int a, int b) {
        return Math.max(a, b);
     }
  
     static int ri() {
        try {
           return read.intNext();
        } catch (IOException e) {
           e.printStackTrace();
        }
        System.exit(2);
        return -1;
     }
  
     static long rl() {
        try {
           return Long.parseLong(read.read());
        } catch (IOException e) {
           e.printStackTrace();
        }
        System.exit(2);
        return -1;
     }
  
     static String rs() {
        try {
           return read.read();
        } catch (IOException e) {
           e.printStackTrace();
        }
        System.exit(2);
        return "";
     }
  
     static String rline() {
        try {
           return read.rline();
        } catch (IOException e) {
           e.printStackTrace();
        }
        System.exit(2);
        return "";
     }
  
     static char rc() {
        return rs().charAt(0);
     }
  
     static double rd() {
        try {
           return read.doubleNext();
        } catch (IOException e) {
           e.printStackTrace();
        }
        System.exit(2);
        return -1;
     }
  }
  