#include<bits/stdc++.h>
using namespace std;
int main(){
int T;
cin>>T;
while(T--){
int n,eA=0,oA=0,a[100006],t=1;
cin>>n;
for(int i=1;i<=n;i++){
cin>>a[i];
if(i%2)oA+=a[i];
else eA+=a[i];
}
for(int i=1,j=n;i<=n;i++,j--){
if(a[i]!=a[j]){
t=0;
break;
}
}
if(!t&&eA==oA)cout<<"Yes"<<endl;
else cout<<"No"<<endl;
}
return 0;
}