#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
const ll mod = 1e9 + 7;
#define pival 3.14159265358979323846264338327950L
#define pll pair<ll,ll>
#define pb push_back
#define mp make_pair
#define fi first
#define se second
#define pqq priority_queue
#define all(a) a.begin(), a.end()
#define sz(a) (ll)(a.size())
#define endl '\n'
#define DEBUG
#ifdef DEBUG
#define debug(...) __f(#__VA_ARGS__, __VA_ARGS__)
    template <typename Arg1>
    void __f(const char* name, Arg1&& arg1)
    {
        cerr << name << " = " << arg1 << endl;
    }
    template <typename Arg1, typename... Args>
    void __f(const char* names, Arg1&& arg1, Args&&... args)
    {
        const char* comma = strchr(names + 1, ','); cerr.write(names, comma - names) << " = " << arg1 << " || ";
        __f(comma+1, args...);
    }
#else
#define debug(...)
#endif
template <class Ch, class Tr, class Container>
basic_ostream <Ch, Tr> & operator << (basic_ostream <Ch, Tr> & os, Container const& x) {
    os << "{ ";
    for(auto& y : x) os << y << " ; ";
    return os << "}";
}
template <class X, class Y>
ostream & operator << (ostream & os, pair <X, Y> const& p) {
    return os << "[ " << p.first << ", " << p.second << "]" ;
}
ll power(ll x, ll y, ll p)
{ 
    ll res = 1;  
    x = x % p;
    while (y > 0) { 
        if (y & 1) res = (res * x) % p; 
        y = y >> 1;
        x = (x * x) % p;   
    } 
    return res; 
}
const ll L = 2e5 + 5;
ll arr[L];
ll arr2[L];
ll pref[L];
ll suff[L][2];
int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
 	ll t;
 	cin >> t;
 	while (t--) {
 		ll n;
 		cin >> n;
 		for (ll i = 1; i <= n; i++) 
 			cin >> arr[i];
 		arr2[1] = arr[1];
 		for (ll i = 2; i <= n; i++) {
 			arr2[i] = -arr2[i - 1] + arr[i];
 		}
 		pref[0] = 1e18;
 		suff[n + 1][0] = 1e18;
 		suff[n + 1][1] = 1e18;
 		for (ll i = 1; i <= n; i++) {
 			pref[i] = min(pref[i - 1], arr2[i]);
 		}
 		for (ll i = n; i >= 1; i--) {
 			ll req = i % 2;
 			suff[i][req] = min(suff[i + 1][req], arr2[i]);
 			suff[i][1 - req] = suff[i + 1][1 - req];
 		}
 		if (pref[n] >= 0 && arr2[n] == 0) {
 			cout << "YES" << endl;
 			continue;
 		}
 		ll f = 0;
 		for (ll i = 1; i <= n - 1; i++) {
 			if (pref[i - 1] >= 0) {
 				ll req = i % 2;
 				ll val1 = suff[i + 1][req] - 2 * arr[i] + 2 * arr[i + 1];
 				ll val2 = suff[i + 1][1 - req] - 2 * arr[i + 1] + 2 * arr[i];
 				ll val3 = arr2[i] - arr[i] + arr[i + 1];
 				ll ch = n % 2;
 				ll end;
 				if (ch == req) end = arr2[n] - 2 * arr[i] + 2 * arr[i + 1];
 				else end = arr2[n] + 2 * arr[i] - 2 * arr[i + 1];
 				if (val1 >= 0 && val2 >= 0 && val3 >= 0 && end == 0) {
 					f = 1;
 				}
 			}
 		}
 		if (f == 1) {
 			cout << "YES" << endl;
 		}
 		else {
 			cout << "NO" << endl;
 		}
 	}   
	return 0;
}