#include <bits/stdc++.h>
#define int long long int
#define ll long long int
#define ld long double
#define getFaster ios_base::sync_with_stdio(false), cin.tie(nullptr)
#define rep(i, init, n) for (int i = init; i < (int)n; i++)
#define rev(i, n, init) for (int i = (int)n; i >= init; i--)
#define MOD1 1e9 + 7
#define MOD2 998244353
#define f first
#define s second
#define endl '\n'
#define pii pair<int, int>
#define tii tuple<int, int>
#define all(v) v.begin(), v.end()
#define mt make_tuple
#define precise(i) cout << fixed << setprecision(i)
#define codejam cout << "Case #" << ii + 1 << ": ";
#define impossible cout << "IMPOSSIBLE" << endl;
#define error(s) throw runtime_error(s)
#define hash hash1
std::mt19937_64 rng(std::chrono::steady_clock::now().time_since_epoch().count());
int myRand(int R)
{
     int val = rng() % R;
     assert(val >= 0);
     return val;
}

const long double PI = atan(1.0) * 4;
const int32_t INF32 = 2e9 + 7;
const int64_t INF64 = 3e18;
const int32_t LOG = 21;
int32_t MOD = MOD1;

using namespace std;

//-------------------DEBUGGING-------------------------
void my_debugger(string s, int LINE_NUM) { cerr << endl; }
template <typename start, typename... end>
void my_debugger(string s, int LINE_NUM, start x, end... y)
{
     if (s.back() != ',')
     {
          s += ',';
          cerr << "LINE(" << LINE_NUM << "): ";
     }
     int i = s.find(',');
     cerr << s.substr(0, i) << " = " << x;
     s = s.substr(i + 1);
     if (!s.empty())
          cerr << ", ";
     my_debugger(s, LINE_NUM, y...);
}

#ifdef AJIT
#define debug(...) my_debugger(#__VA_ARGS__, __LINE__, __VA_ARGS__);
#else
#define debug(...) ;
#endif

//-----------------------------------------------------

template<int INF>
struct segtree_min
{
     vector<int> t;
     vector<int> lazy;
     vector<int> a;
     int n;
     
     void build(int i,int l,int r)
     {
            int mid=(l+r)>>1;
            if(l==r)
            {
                 t[i]=a[l];
                 return;
            }
            build(2*i,l,mid);
            build(2*i+1,mid+1,r);
            t[i]=min(t[2*i],t[2*i+1]);
     }

     segtree_min(int n): t(4*n+6), lazy(4*n+6)
     {
          this->n = n;
     }

     segtree_min(int n,vector<int>& v): t(4*n+6),lazy(4*n+6), a(v)
     {
         this->n=n;
         build(1,1,n);
     }
 
     void push(int i,int tl,int tr)
     {
           t[i]+=lazy[i];
           if(tl==tr)
           {
                lazy[i]=0;
                return;
           }
           lazy[2*i+1]+=lazy[i];
           lazy[2*i]+=lazy[i];
           lazy[i]=0;
     }
     
     void update(int i,int tl,int tr,int l,int r,int inc)
     {
          push(i,tl,tr);
          if(l>r)return;
          if(l<=tl && tr<=r)
          {
               lazy[i]+=inc;
               push(i,tl,tr);
               return;
          }
          
          int tmid=(tl+tr)>>1;
          update(2*i,tl,tmid,l,min(tmid,r),inc);
          update(2*i+1,tmid+1,tr,max(l,tmid+1),r,inc);
          t[i]=min(t[2*i],t[2*i+1]); 
     }
 
     void update(int l,int r,int inc)
     {
          if(l>r)
          return;
          update(1,1,n,l,r,inc);
     }

     int query(int i,int tl,int tr,int l,int r)
     {
          push(i,tl,tr);
          if(l>r)return INF;
          if(l<=tl && tr<=r)
          return t[i];
          int tmid=(tl+tr)>>1;
          return min(query(2*i,tl,tmid,l,min(tmid,r)),query(2*i+1,tmid+1,tr,max(l,tmid+1),r));
     }  
 
     int query(int l,int r)
     {
          return query(1,1,n,l,r);
     }

};

int32_t main()
{
     getFaster;
     //files_init();
     int tests = 1;
     cin >> tests;
     rep(ii, 0, tests)
     {
          int n;
          cin>>n;
          vector<int> a(n+1);
          vector<int> vals(n+1);
          rep(i,1,n+1)cin>>a[i];
          rep(i,0,n+1)vals[i]=INF64;
          int tot=0;
          int sign=1;
          int even=n/2;
          int odd=((n/2)+(n%2));
          segtree_min<INF64> seg_even(even),seg_odd(odd);
          bool g1=true;
          rep(i,1,n+1)
          {
                tot+=sign*a[i];
                if(i%2==0)
                {
                     int ind=(i)/2;
                     seg_even.update(ind,ind,-tot);
                     if(tot>0)
                     {
                          g1=false;
                     }
                }
                else
                {
                     int ind=(i+1)/2;
                     seg_odd.update(ind,ind,tot);
                     if(tot<0)
                     {
                          g1=false;
                     }
                }
                sign=-sign;
          }
          if(tot==0 && g1)
          {
               cout<<"YES"<<endl;
               continue;
          }

          sign=1;
          int sum=0;
          bool g=false;
          debug(tot);
          rep(i,1,n)
          {
                if(1)
                {
                     int prev=sum+sign*a[i]-sign*a[i+1];
                     int cur=sum-sign*a[i]+sign*a[i+1];
                     debug(i,"HELLO",prev,cur,tot-prev+cur);
                     if(tot-prev+cur!=0)goto update;
                     
                     int toAdd_odd=cur-prev;
                     int toAdd_even=prev-cur;

                     int ind_even=i/2;
                     int ind_odd=(i+1)/2;

                     if(i%2==1)
                     {
                          if(sum+sign*a[i+1]<0 || sum-sign*a[i]+sign*a[i+1]>0)goto update;
                          ind_odd=(i+3)/2;
                          ind_even=(i+3)/2;
                     }
                     else
                     {
                          if(sum+sign*a[i+1]>0 || sum-sign*a[i]+sign*a[i+1]<0)goto update;
                          ind_odd=(i+4)/2;
                          ind_even=(i+2)/2;
                     }

                     debug(ind_even,ind_odd,even,odd);

                     if((ind_even<=even && seg_even.query(ind_even,even)+toAdd_even<0) || (ind_odd<=odd && seg_odd.query(ind_odd,odd)+toAdd_odd<0))
                     goto update;

                     g=true;
                     break;
                }

                update:

                sum+=sign*a[i];
                if(i&1)
                {
                     if(sum<0)
                     break;
                }
                else
                {
                     if(sum>0)
                     break;
                }
                sign=-sign;
          }

          cout<<(g?"YES":"NO")<<endl;

     }
     return 0;
}