#include "bits/stdc++.h"
using namespace std;
const long long inf = 1LL << 50;
signed main() {
	ios_base :: sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
	int t;
	cin >> t;
	while(t--) {
		int n;
		cin >> n;
		vector<long long> a(n + 1);
		vector<int> b(n);
		long long s = 0;
		for(int i = 0; i < n; ++i) {
			cin >> b[i];
			s += b[i];
			a[i] = b[i];
		}
		if(s & 1) {cout << "NO\n"; continue;}
		bool flag = false;
		vector<bool> ok(n + 1);
		ok[n] = true;
		a[n] = 0;
		for(int i = n - 1; i >= 0; --i) {
			a[i] -= a[i + 1];
			ok[i] = ok[i + 1] && a[i] >= 0;
		}
		if(ok[0] && a[0] == 0) flag = true;
		long long p, q;
		p = q = inf;
		for(int i = 0; i < n - 1; ++i) {
			if(ok[i + 2]) {
			long long x = b[i + 1], y = b[i] - a[i + 2];
			x -= y;
			if(x >= 0 && y >= 0) {
				if(i & 1) {
					if(q + a[i] - x >= 0 && p - a[i] + x >= 0 && (i == 0 && x == 0 || i && a[0] + a[i] - x == 0))
						flag = true;
				} else {
					if(p + a[i] - x >= 0 && q - a[i] + x >= 0 && (i == 0 && x == 0 || i && a[0] - a[i] + x == 0))
						flag = true;
				}
			}
			}
			if(i & 1) p = min(p, a[i]);
			else q = min(q, a[i]);
		}
		cout << (flag ? "YES\n" : "NO\n");
	}
	return 0;
}
