#include <iostream>
#include <cstdio>

using namespace std;

#define MAXN 200005

int t, n;
int a[MAXN];
int pre[MAXN], suf[MAXN];
bool pre_ok[MAXN], suf_ok[MAXN];
bool ans;
int main()
{
    //freopen("CF#696D.in", "r", stdin);
    scanf("%d", &t);
    while(t --)
    {
        ans = true;
        scanf("%d", &n);
        pre_ok[0] = suf_ok[n + 1] = true;
        suf[n + 1] = 0;
        for(int i = 1;i <= n;i ++) scanf("%d", a + i);

        for(int i = 1;i < n;i ++)
        {
            pre[i] = a[i] - pre[i - 1];
            pre_ok[i] = pre_ok[i - 1];
            if(pre[i] < 0) {
                pre[i] = 0;
                pre_ok[i] = ans = false;
            }
        }
        if(a[n] != pre[n - 1]) pre_ok[n] = ans = false;
        for(int i = n;i > 1;i --)
        {
            suf[i] = a[i] - suf[i + 1];
            suf_ok[i] = suf_ok[i + 1];
            if(suf[i] < 0) {
                suf[i] = 0;
                suf_ok[i] = ans = false;
            }
        }
        if(a[1] != suf[2]) suf_ok[1] = ans = false;
        for(int i = 1;i < n;i ++)
        {
            if(pre_ok[i - 1] && suf_ok[i + 2] && a[i + 1] - pre[i - 1] >= 0 && a[i] - suf[i + 2] == a[i + 1] - pre[i - 1]) ans = true;
        }
        if(ans) printf("YES\n");
        else printf("NO\n");
    }
    return 0;
}