Conditional List

0

0 votes
Problem

You will be given a list X of length L . You need to find whether there exists an element which satisfies the following condition. Find y , such that

img1

If there exist any y which satisfied this condition then print YES , otherwise print NO

Let give List X be
1 2 3 3
X(1)+X(2)=X(4), therefore position 3 satisfies the condition.
Output will be
YES

Input
The first line contains T, the number of test cases. For each test case, the first line contains L, the number of elements in the list X. The second line for each test case contains L space-separated integers, denoting the list X.

Output
For each test case print YES if condition exists; otherwise print NO.

Constraints
1≤T≤10
1≤L≤10^5
1≤Xi ≤2×10^4
1≤i≤L

Sample Input
1
3
1 2 3
Sample Output
NO
Time Limit: 1
Memory Limit: 256
Source Limit:
Explanation

No position exist which satisfies the condition

Contributers:
Editor Image

?