 #include<iostream>
 #include<cstdio>
 using namespace std;

 int main()
 {
     int k;
     scanf("%d",&k);
 ///  cin>>k;
     while (k--){

     int t,n,a=0,b=0,c=0;
     cin>>t;
     while(t--)
     {
         scanf("%d",&n);
    ///  cin>>n;
         if(n%4==0)
            c++;
         else if(n%2==0)
             b++;
         else
             a++;
     }
     c-=a;
     if(c>=0||(c==-1 && b==0))
        cout<<"YES"<<endl;
     else
        cout<<"NO"<<endl;
     }

 }

