import math
import os
import random
import re
import sys

def balancedSums(arr):
    total = sum(arr)
    so_far = 0
    for i in arr:
        if total - i == 2*so_far:
            return 'YES'
        else:
            so_far += i

    return 'NO'
if __name__ == '__main__':
    fptr = open(os.environ['OUTPUT_PATH'], 'w')

    T = int(input().strip())

    for T_itr in range(T):
        n = int(input().strip())

        arr = list(map(int, input().rstrip().split()))

        result = balancedSums(arr)

        fptr.write(result + '\n')

    fptr.close()
