

#include <bits/stdc++.h>
using namespace std;
#define io_speed_up ios::sync_with_stdio(false),cin.tie(0),cout.tie(0)
template<typename T>void rd(T&x){int f=0,c;while(!isdigit(c=getchar()))f^=!(c^45);x=(c&15);while(isdigit(c=getchar()))x=x*10+(c&15);if(f)x=-x;} //读整型
template<typename T>void pt(T x,int c=10){if(x<0)putchar('-'),x=-x;if(x>9)pt(x/10,-1);putchar(x%10+48);if(c!=-1)putchar(c);}
template<typename T>void umax(T&x,const T&y){if(x<y)x=y;}
template<typename T>void umin(T&x,const T&y){if(x>y)x=y;}
#define rep(i,a,b) for (int i=a;i<=b;i++)
#define per(i,a,b) for (int i=a;i>=b;i--)
#define for1(i,n) for (int i=1;i<=n;i++)
#define for0(i,n) for (int i=0;i<n;i++)
#define ms(a,b)  memset(a,b,sizeof a)
#define all(n) (n).begin(), (n).end()
#define sz(x) (int)x.size()
#define fi first
#define se second
using ll = long long;
using ld = long double;
using pii = pair<int,int>;
using pll = pair<long,long>;
const int inf = 0x3f3f3f3f;
const int maxn = 2e5+5;
const int mod = 1e9+7;
int a[maxn],la[maxn],ra[maxn],n;
bool check(int a,int b,int c,int d) {
    return b-a>=0 && c-b+a>=0 && d-c+b-a==0;
}
int main()
{
    io_speed_up;
    int T;
    cin>>T;
    while(T--) {
        cin>>n;
        rep(i,1,n) cin>>a[i];
        fill(la,la+n+2,0);
        fill(ra,ra+n+2,0);
        rep(i,1,n) {
            la[i] = (la[i-1]<0)?-1:a[i] - la[i-1];
            int j = n-i+1;
            ra[j] = (ra[j+1]<0)?-1:a[j] - ra[j+1];
        }
        if(la[n]==0) {
            cout<<"YES\n";
            continue;
        }
        bool flag = false;
        rep(i,1,n-1) {
            flag |= la[i-1]>=0 && ra[i+2]>=0 && check(la[i-1],a[i+1],a[i],ra[i+2]);
        }
        cout<<(flag?"YES":"NO")<<"\n";
    }
    return 0;
}
