#include <iostream>
#include <cstdio>
#include <cstring>
#include <vector>
#include <set>
#include <algorithm>
using namespace std;
const int N = 2e5 + 7;

int a[N];
long long f[N], g[N];

int main(){
	int T;
	scanf("%d", &T);
	while (T--){
		int n;
		scanf("%d", &n);
		for (int i = 1; i <= n; i++){
			scanf("%d", &a[i]);
			if (i == 1) f[i] = a[i];
			else f[i] = a[i] - f[i - 1];
		}


		g[n] = f[n]; g[n - 1] = f[n - 1];
		for (int i = n - 2; i >= 1; i--){
			g[i] = min(f[i], g[i + 2]);
		}
		//printf("%lld %lld %lld\n", g[1], g[2], f[0]);
		if (g[1] >= 0 && g[2] >= 0 && f[n] == 0){
			printf("YES\n");
		} else {
			bool flag = false;
			for (int i = 1; i < n; i++){
				int t = (a[i] - a[i + 1]) * 2;
				//printf("%d %lld\n", t, f[n]);
				if (n % 2 == i % 2){
					if (t != f[n]){
						if (f[i] < 0) break;
						continue;
					}
				} else {
					if (-t != f[n]){
						if (f[i] < 0) break;
						continue;
					}
				}
				//printf("%d %d\n", i, t);
				if (g[i + 1] + t >= 0 && f[i] - t / 2 >= 0 && (i + 2 > n || g[i + 2] - t >= 0)){
					flag = true;
					break;
				}
				if (f[i] < 0) break;
			}
			if (flag) printf("YES\n");
			else printf("NO\n");
		}
	}
	return 0;
}