#include<bits/stdc++.h>
#define lld long long int
#define ulld unsigned long long
#define vll vector<lld>
#define pll pair<lld,lld>
#define mll map<lld,lld>
#define sll set<lld>
#define pb push_back
#define ss second
#define ff first
#define mp make_pair
#define mod 1000000007 //998244353
#define answer(x) cout<<endl<<"answer : "<<x<<endl<<endl;
#define op(x) cout<<x<<endl;
#define maxn 500005
#define lld_max 5000000000000000000
#define messi ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define REP(i,a,b) for(i=a;i<=b;i++)
#define rREP(i,a,b) for(i=a;i>=b;i--)
using namespace std;
void __print(int x) {cerr << x;}
void __print(long x) {cerr << x;}
void __print(long long x) {cerr << x;}
void __print(unsigned x) {cerr << x;}
void __print(unsigned long x) {cerr << x;}
void __print(unsigned long long x) {cerr << x;}
void __print(float x) {cerr << x;}
void __print(double x) {cerr << x;}
void __print(long double x) {cerr << x;}
void __print(char x) {cerr << '\'' << x << '\'';}
void __print(const char *x) {cerr << '\"' << x << '\"';}
void __print(const string &x) {cerr << '\"' << x << '\"';}
void __print(bool x) {cerr << (x ? "true" : "false");}

template<typename T, typename V>
void __print(const pair<T, V> &x) {cerr << '{'; __print(x.first); cerr << ','; __print(x.second); cerr << '}';}
template<typename T>
void __print(const T &x) {int f = 0; cerr << '{'; for (auto &i: x) cerr << (f++ ? "," : ""), __print(i); cerr << "}";}
void _print() {cerr << "]\n";}
template <typename T, typename... V>
void _print(T t, V... v) {__print(t); if (sizeof...(v)) cerr << ", "; _print(v...);}
#ifndef ONLINE_JUDGE
#define debug(x...) cerr << "[" << #x << "] = ["; _print(x)
#else
#define debug(x...)
#endif
int main() {messi lld t=1;cin>>t;
    while(t--)
    {
        lld n=0,m=0,k=0,i=0,j=0,p=0,q=0,x=0,y=0,z=0,ans=0,cnt=0,l=0,r=0,mid=0,lo=0,hi=0;string s;bool flag=false;
        cin>>n; lld a[n+2]; REP(i,1,n) cin>>a[i];
        a[0] = 0; a[n+1] = 0;
        lld dpleft[n+2]; lld dpright[n+2];
        dpleft[0] = a[0];
        for(i=1;i<=n+1;i++)
            if(dpleft[i-1]==-1 || a[i]<dpleft[i-1])
                dpleft[i] = -1;
            else
                dpleft[i] = a[i] - dpleft[i-1];
        dpright[n+1] = a[n+1];
        for(i=n;i>=0;i--)
            if(dpright[i+1]==-1 || dpright[i+1]>a[i])
                dpright[i] = -1;
            else
                dpright[i] = a[i] - dpright[i+1];
        for(i=1;i<=n;i++)  //no swaps
            if(dpleft[i]!=-1 && dpleft[i] == dpright[i+1]){
                flag = true; break;
            }
        for(i=1;i<n;i++) //swapping a[i] and a[i+1]
            if(dpleft[i-1]!=-1 && dpright[i+2]!=-1 && a[i+1]>=dpleft[i-1] && a[i]>=dpright[i+2] && ((a[i] - dpright[i+2]) == (a[i+1] - dpleft[i-1]))){
                flag = true; break;
            }
        if(flag) cout<<"YES"<<endl;
        else  cout<<"NO"<<endl;
    }
	return 0;
}
/*  CODED BY:-
 ________________________________________
|            __        __                |
|  /\   /\  |__)  /\  |  \ |__| \ /  /\  |
| /~~\ /~~\ |  \ /~~\ |__/ |  |  |  /~~\ |
|________________________________________|

*/
