/*
 * @Author: cy
 * @Date: 2021-01-27 21:49:52
 * @LastEditors: cy
 * @LastEditTime: 2021-01-27 22:46:59
 * @FilePath: \20200125\D2.cpp
 * @Tags: 
 * @Links: 
 */
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const int Nn=2*1e5+5;
const ll inf=0x3f3f3f3f3f3f;
int n,a[Nn];ll ls[Nn],rs[Nn];
int main()
{
    int t;
    cin>>t;
    while(t--){
        cin>>n;
        memset(ls,0,sizeof(ls));
        memset(rs,0,sizeof(rs));

        int f=0;
        for(int i=1;i<=n;i++){
            scanf("%d",&a[i]);
            ls[i]=-ls[i-1]+a[i];
            if(ls[i]<0) ls[i]=inf;
        }
        
        for(int i=n;i>=1;i--){
            rs[i]=-rs[i+1]+a[i];
            if(rs[i]<0) rs[i]=inf;
        }

        for(int i=0;i<=n;i++){
            if(ls[i]==rs[i+1]&&rs[i]!=inf){
                f=1;break;
            }    
        }    
        
        if(f){
            puts("YES");continue;
        }     
        
        for(int i=1;i<=n;i++) 
        {
            
            int x=-ls[i-1]+a[i+1];
            int y=-rs[i+2]+a[i];
            
            if(x==y&&x>=0){
                f=1;break;
            }
        }

        if(f) puts("YES");else puts("NO");

    }
    return 0;
}
  							      		 					 		    	