#include <bits/stdc++.h>
#define ll long long
#define PI acos(-1)
#define db double
using namespace std;
const int N = 2e5+100;
const ll INF = 1e18;
ll T;
ll n,m,k;

ll L[N],R[N];
string s1,s2;

bool check(vector<ll> x)
{
	int siz = x.size();
	for(int i=1;i<siz;i++)
	{
		if(x[i] < x[i-1])	return false;
		x[i] -= x[i-1];
	}
	return x.back() == 0;
}

int main()
{
	scanf("%lld",&T);
	while(T--)
	{
		scanf("%lld",&n);
		vector<ll> a(n+20,0),b(n+20,0);
		bool flag = false;
		for(ll i=1;i<=n;i++)
		{
			scanf("%lld",&a[i]);
			b[i] = a[i];
		}
		if(n==1)
		{
			cout << "NO" << endl;
			continue;
		}
		if(check(a)) flag = true;
		swap(a[1],a[2]);	
		if(check(a))	flag = true;
		swap(a[1],a[2]);
		
		swap(a[n],a[n-1]);	
		if(check(a))	flag = true;
		swap(a[n],a[n-1]);
		
		for(ll i=1;i<=n;i++)
		L[i] = R[i] = -INF;
		
		for(ll i=1;i<=n;i++)
		{
			if(b[i] < b[i-1])	break;
			else 
			{
				b[i] -= b[i-1];
				L[i] = b[i];
			}
		}
		for(ll i=1;i<=n;i++)	b[i] = a[i];
		for(ll i=n;i>=1;i--)
		{
			if(b[i] < b[i+1])	break;
			else 
			{
				b[i] -= b[i+1];
				R[i] = b[i];
			}
		}
		for(int i=2;i<=n-2;i++)
		{
			if(flag) break;
			vector<ll> t = {L[i-1],a[i+1],a[i],R[i+2]};
			if(L[i-1] == -INF || R[i+2] == -INF) continue;
			if(check(t)) 
			{
				flag = true;
				break;
			}
		}
		if(flag) cout << "YES" << endl;
		else cout << "NO" << endl;
	}
	
	
	return 0;
}