All Submissions


Problem Statement

You are given an array of N non-negative integers.
Any integer X in the array can be transformed into -X.
Check if it is possible to make the total sum of the array equal to 0 by using the above transformation on one or more integer(s) in the array.

Input

The first line of input contains T, the number of test cases.
Each test case starts with N, followed by N integers.

Output

For each test case, print "YES" if it is possible to get a total sum of 0, otherwise print "NO".
The output for each test case should be followed by a new line.

Constraints
  • T <= 60
  • 1 <= N <= 100
  • 0 <= all integers in the array <= 1000

Sample Input


3
4
2 2 2 2
5
1 2 5 1 3
3
1 4 9


Sample Output


YES
YES
NO


Explanation:
Case#1 : 2*(-1) + 2*(-1) + 2 + 2 = 0
Case#2 : 1 + 2 + 5*(-1) + 1*(-1) + 3 = 0

Problem Setter: Rohan Laishram


Languages: C,C++,Java

Time Limit: 1 Second(s)
Score: 100 Point(s)
Input File Limit: 50000 Bytes

Submit

Login to post clarification.

No Clarifications.

Contest

Mode Judge

Passive

Online

Overall Rankings

RankNameScore
1xyz0
2Ams0
3TIP0
4team420
5xyzz0
6asdasdasd0
7abcd0
8khankhan0
9Gabriel0
10gigel0