#include <cstdlib>
#include <cstdio>
#include <algorithm>
#include <memory>
#include <vector>
#include <queue>
#include <stack>
#include <bitset>
#include <cstring>
#include <array>
#include <set>
#include <iostream>
#include <map>

using namespace std;

typedef long long ll;

const ll INF = 1e18 + 7;
const ll maxn = 2e5 + 7;

int n;
ll arr[maxn];
ll pre[maxn];
ll suf[maxn];

void solve(){
    scanf("%d", &n);
    for(int i = 1; i <= n; i++) scanf("%lld", &arr[i]);
    for(int i = 0; i <= n+1; i++) pre[i] = suf[i] = 0;
    for(int i = 1; i <= n; i++) {
        if(arr[i] >= pre[i-1]) pre[i] = arr[i] - pre[i-1];
        else pre[i] = INF-1;
    }
    for(int i = n; i >= 1; i--){
        if(arr[i] >= suf[i+1]) suf[i] = arr[i] - suf[i+1];
        else suf[i] = INF;
    }
    bool ok = false;
    for(int i = 1; i < n; i++){
        if(pre[i] == suf[i+1]) ok = true;
        else{
            if(arr[i] >= suf[i+2] && arr[i+1] >= pre[i-1]){
                ll newpre = arr[i] - suf[i+2];
                ll newsuf = arr[i+1] - pre[i-1];
                if(newpre == newsuf) ok = true;
            }
        }
    }
    if(ok) printf("YES\n");
    else printf("NO\n");
}

int main(){
    int t;
    scanf("%d", &t);
    while(t--)
        solve();
    return 0;
}
