#include<iostream>
#include<algorithm>
#include<set>
#include<vector>
 
using namespace std;
int arr[200000];
int main(){
    ios::sync_with_stdio(false);
    cin.tie(NULL);
    int t;
    cin>>t;
    int n;
    for(int _=0;_<t;_++){
        cin>>n;
        bool possible = false;
        for(int i = 0;i<n;i++){
            cin>>arr[i];
        }
        long long s = arr[0];
        possible = true;
        for(int i=1;i<n-1;i++){
            if(s>arr[i]){
                possible = false;
                break;
            }
            s = arr[i] - s;
        }
        if(s!=arr[n-1]){
            possible = false;
        }
        if(possible){
            cout<<"YES\n";
            continue;
        }
        multiset<int>a,b;
        s = arr[0];
        long long total = arr[0] + arr[n-1];
        for(int i=1;i<n-1;i++){
            s = arr[i] - s;
            total += arr[i];
            if(i%2==0){
                a.insert(s);
            }
            else{
                b.insert(s);
            }
        }
        total = arr[n-1] - s;
        s = arr[0];
        int mult = 1;
        if(n%2==0){
            mult = -1;
        }
        for(int i=0;i<n-1;i++){
            int dif = arr[i+1] - arr[i];
            //cout<<" de "<<i<<" "<< dif<<" ed ";
            if(s + dif >= 0){
                if(i%2==0){
                    //cout<<" M "<< *(b.begin()) - 2*dif <<" "<<*(a.begin()) + 2*dif <<" " << total+2*mult*dif <<" M ";
                    possible = true;
                    if(!b.empty()){
                        possible = possible && (*(b.begin()) - 2*dif >= 0);
                    }
                    if(!a.empty()){
                        possible = possible && (*(a.begin()) + 2*dif >= 0);
                    }
                    possible = possible && (total+2*mult*dif==0);
                    if(possible){
                        break;
                    }
                }
                else{
                    //cout<<" M2 "<< *(b.begin()) + 2*dif <<" "<<*(a.begin()) - 2*dif <<" " << total-2*mult*dif <<" M ";
                                        possible = true;
                    if(!b.empty()){
                        possible = possible && (*(b.begin()) + 2*dif >= 0);
                    }
                    if(!a.empty()){
                        possible = possible && (*(a.begin()) - 2*dif >= 0);
                    }
                    possible = possible && (total-2*mult*dif==0);
                    if(possible){
                        break;
                    }
                }
            }
            if(s<0){
                break;
            }
            s = arr[i+1] - s;
            if(i%2==0){
                auto m = b.find(s);
                if(m!=b.end()){
                    b.erase(m);
                }
            }
            else{
                auto m = a.find(s);
                if(m!=a.end()){
                    a.erase(m);
                }
            }
        }
        if(possible){
            cout<<"YES\n";
        }
        else{
            cout<<"NO\n";
        }
    }
}