#include<cstdio>
#include<cstring>
#include<cmath>
#include<algorithm>
#include<iostream>
#include<vector>
#include<set>
#include<map>
#include<queue>
#include<unordered_map>
#include<string>
typedef long long ll;
using namespace std;    

const ll inf=1e18;
const int N=2e5+5;
ll a[N];
ll pre[N];
ll suf[N];

int main()
{
    cin.tie(0);std::ios::sync_with_stdio(false);
    int T;
    cin>>T;
    int n;
    while(T--){
        cin>>n;
        memset(pre,0,sizeof(pre));
        memset(suf,0,sizeof(suf));
        for(int i=1;i<=n;i++)cin>>a[i];
        for(int i=1;i<=n;i++){
            if(a[i]>=pre[i-1])pre[i]=a[i]-pre[i-1];
            else pre[i]=inf/2;
        }
        for(int i=n;i>=1;i--){
            if(a[i]>=suf[i+1])suf[i]=a[i]-suf[i+1];
            else suf[i]=inf;
        }
        int flag=0;
        for(int i=1;i<n;i++){
            if(pre[i]==suf[i+1]){
                flag=1;
                break;
            }
            else {
                ll ans=a[i];ll cnt=a[i+1];
                if(ans>=suf[i+2]&&cnt>=pre[i-1]){
                    ans-=suf[i+2],cnt-=pre[i-1];
                    if(ans==cnt){
                        flag=1;
                        break;
                    }
                }
            }
        }
        if(flag){
            cout<<"YES"<<endl;
        }
        else {
            cout<<"NO"<<endl;
        }
    } 
    return 0;
}