#pragma GCC optimization ("Ofast")
#pragma GCC optimization ("unroll-loops")
#pragma GCC optimize("inline")
#pragma GCC optimize("omit-frame-pointer")
#include <cassert>
#include <iostream>
#include <algorithm>
#include <cstdio> 
#include <complex>
#include <vector>
#include <set>
#include <map>
#include <cmath>
#include <queue>
#include <string>
#include <cstdlib>
#include <memory.h>
#include <ctime>
#include <bitset>
#include <fstream>
#include <queue>
#include <stack>
#include <unordered_map>
#include <unordered_set>
#include <functional>
#include <time.h>
#include <chrono>
#include <random>
#include <stdio.h>
#include <stddef.h>
#include <stdlib.h>
#define UI unsigned int
#define LL long long
#define ll long long
#define GT(it,v) for(auto it:v)
#define FU(i,a,b) for(int i=(a);i<(b);i++)
#define FD(i,a,b) for(int i=(a);i>(b);i--)
#define LD long double
#define PI 3.1415926535897932384626
#define PII pair<int,int>
#define PLL pair<LL,LL>
#define VLL vector<long long >
#define VVLL vector<vector<long long > >
#define VPLL vector<pair<long long, long long>>
#define VVPLL vector<vector<pair<long long, long long>>>
#define VB vector<bool> 
#define VD vector<double>
#define VVD vector<vector<double> >
#define VPD vector<pair<double,double> >
#define MP make_pair
#define PB push_back
#define FI first
#define SE second
#define SORT(v) std::sort(v.begin(),v.end())
#define GSORT(v,T) sort(v.begin(),v.end(),greater<T>)
#define UNIQUE(v) decltype(v.begin()) it = unique(v.begin(),v.end()); v.resize(distance(v.begin(),it))
using namespace std;
LL inp, Inp; LL i1, i2, i3, i4, i5, i6, i7, i8;
LL MOD = 998244353, MOD1 = (LL)1e9 + 7, MOD2 = (LL)1e9 + 9; long long MOD3 = (long long)1e9 + 21 /*33*/;  double eps = 1e-9;
LL TMP = (chrono::high_resolution_clock::now().time_since_epoch().count() % MOD + MOD) % MOD;
auto STTMP = chrono::steady_clock::now();//auto ENTMP = chrono::steady_clock::now();
#ifdef _DEBUG
bool debug = true;
#else
bool debug = false;
#endif // DEBUG
//ELTIME = double(chrono::duration_cast<chrono::milliseconds>(ENTMP - STTMP).count());
//time_t result = time(NULL); char SS[26]; ctime_s(SS, sizeof SS, &result);
//transform(SS, SS + 26, SS, [](char ch) {return ch == ' ' ? '_' : ch; }); printf("%s", SS);;


int main() {
    ios_base::sync_with_stdio(0);
    std::cin.tie(0);
    std::cout.precision(20);
    srand((unsigned int)TMP);
    LL T; cin >> T;

    FU(t, 0, T) {
        LL N; cin >> N;
        VLL A;
        LL eve = 0, odd = 0;
        FU(n, 0, N) {
            cin >> i1; A.push_back(i1);
            if (n % 2 == 0) {
                eve += i1;
            }
            else {
                odd += i1;
            }
        }
        vector<bool> fposs(N), bposs(N);
        VLL fleft(N), bleft(N);
        LL diff = eve - odd;
        eve = 0, odd = 0;
        FU(n, 0, N) {
            if (n % 2 == 0) {
                if (n == 0 || (odd >= eve && fposs.at(n - 1) == 1)) {
                    fposs.at(n) = 1;
                }
                eve += A.at(n);
                fleft.at(n) = eve - odd;
            }
            else {
                if (n == 0 || (eve >= odd && fposs.at(n - 1) == 1)) {
                    fposs.at(n) = 1;
                }
                odd += A.at(n);
                fleft.at(n) = odd - eve;
            }
        }
        eve = 0, odd = 0;
        FD(n, N - 1, -1) {
            if (n % 2 == 0) {
                if (n == N - 1 || (odd >= eve && bposs.at(n + 1) == 1)) {
                    bposs.at(n) = 1;
                }
                eve += A.at(n);
                bleft.at(n) = eve - odd;
            }
            else {
                if (n == N - 1 || (eve >= odd && bposs.at(n + 1) == 1)) {
                    bposs.at(n) = 1;
                }
                odd += A.at(n);
                bleft.at(n) = odd - eve;
            }
        }
        bool poss = 0;
        if (diff == 0 && fposs.back() && bposs.front()) {
            poss = 1;
        }
        FU(n, 0, N - 1) {
            LL fl = 0, bl = 0;
            if (n > 0) {
                fl = fleft.at(n - 1);
            }
            if (n + 2ll < N) {
                bl = bleft.at(n + 2);
            }
            if (n % 2 == 0){
                if (2 * (A.at(n) - A.at(n + 1)) == diff && fposs.at(n) && bposs.at(n + 1) && fl <= A.at(n + 1) && bl <= A.at(n)) {
                    poss = 1;
                }
            }
            else {
                if (-2 * (A.at(n) - A.at(n + 1)) == diff && fposs.at(n) && bposs.at(n + 1) && fl <= A.at(n + 1) && bl <= A.at(n)) {
                    poss = 1;
                }
            }
        }
        if (poss) {
            cout << "YES\n";
        }
        else {
            cout << "NO\n";
        }
    }

    return 0;
}