#include<stdio.h>

int main()

{

```
int T,N;
scanf("%d",&T);
int O[T],k=0;
if(T>=1 || T<=100)
{
for(int i=0;i<T;i++)
{
scanf("%d",&N);
if(N>=7 || N<=100)
{
int A[N];
int counter = 0;
for(int i=0;i<N;i++)
scanf("%d",&A[i]);
if(N%2!=0){
for(int i=0;i<N/2;i++){
//printf("A[i] : %d and A[N-i] : %d",A[i],A[N-i]);
if(A[i]==A[N-i-1])
counter++;
}
if(counter==N/2 && A[N/2]==7)
printf("yes\n");
else
printf("no\n");
}
else{
printf("no\n");
}
k++;
}else
{
printf("no\n");
}
}
}
return 0;
```

}