stablegradients/pie-gem5-pairs huggingface dataset:
// Slower C++ solution:
#include<iostream>

using namespace std;

int main()

{

	int n;

	cin>>n;

	int a[n];

	int t1=0,t2=0,t4=0;

	for(int i=0;i<n;i++)

	{

		int b;

		cin>>b;

		if(b%4==0)

		{

			a[i]=4;

			t4++;

		}

		else if(b%2==0)

		{

			a[i]=2;

			t2++;

		}

		else

		{

			a[i]=1;

			t1++;

		}

	}

	if(t4>=t1||(t2==0&&t4+1>=t1))

	{

		cout<<"Yes";

	}

	else

	{

		cout<<"No";

	}

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.291002551192324x):
/*#include<cstdio>      最后一个测试点过不了，不知道为什么

const int maxn = 100010;

int luck[maxn] = {0};

int main(){

    int n;

    int countluck = 0;

    int countunluck = 0;

    int counttwo = 0;

    scanf("%d",&n);

    for(int i = 0;i < n;i++){

        scanf("%d",&luck[i]);

        if(luck[i] % 4 == 0){

            countluck++;

        }else if(luck[i] % 2 == 0){

            counttwo++;

        }else{

            countunluck++;

        }

    }

    if(counttwo == 0){

        if(countunluck - 1 > countluck){

            printf("No\n");

        }else{

            printf("Yes\n");



        }

    }

    else if (counttwo > 0){

        if(counttwo == 1){

            countunluck++;

        }else{

            countluck +=(counttwo/2);

        }



        if(countunluck-1  > countluck){

            printf("No\n");



        }else{

            printf("Yes\n");



        }

    }





    return 0;

}

*/



#include<cstdio>      

const int maxn = 100010;

int luck[maxn] = {0};

int main(){

    int n;

    int countluck = 0;

    int countunluck = 0;

    int counttwo = 0;

    scanf("%d",&n);

    for(int i = 0;i < n;i++){

        scanf("%d",&luck[i]);

        if(luck[i] % 4 == 0){

            countluck++;

        }else if(luck[i] % 2 == 0){

            counttwo++;

        }else{

            countunluck++;

        }

    }

    if(counttwo == 0){

        if(countunluck - 1 > countluck){

            printf("No\n");

        }else{

            printf("Yes\n");



        }

    }

    else if (counttwo > 0){           //将2放在末尾，所以说需要unlucky的数量小于luck的数量

            

        /*if(counttwo == 1){

            countunluck++;

        }else{

            countluck +=(counttwo/2);

        }*/



        if(countunluck > countluck){

            printf("No\n");



        }else{

            printf("Yes\n");



        }

    }





    return 0;

}
// Slower C++ solution:
//soale C

#include <bits/stdc++.h>

using namespace std;

const int N = 1e5 + 20;

typedef long long ll;

ll n, a[N], c[10], d = 0;

int main(){

	cin >> n;

	for(int i = 0; i < n; i ++){

		cin >> a[i];

		if(a[i] % 4 == 0){

			a[i] = 2;

			c[0] += 1;

		}

		else if(a[i] % 4 == 2){

			a[i] = 1;

			c[1] += 1;

		}

		else{

			a[i] = 0;

			c[2] += 1;

		}

	}

	if(c[1] != 0){

		if(c[2] > c[0]){

			d = 1;

		}

	}

	else{

		if(c[2] > c[0] + 1){

			d = 1;

		}

	}

	if(d == 1){

		cout << "No";

	}

	else{

		cout << "Yes";

	}

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.290814305837382x):
/*#include<cstdio>      最后一个测试点过不了，不知道为什么

const int maxn = 100010;

int luck[maxn] = {0};

int main(){

    int n;

    int countluck = 0;

    int countunluck = 0;

    int counttwo = 0;

    scanf("%d",&n);

    for(int i = 0;i < n;i++){

        scanf("%d",&luck[i]);

        if(luck[i] % 4 == 0){

            countluck++;

        }else if(luck[i] % 2 == 0){

            counttwo++;

        }else{

            countunluck++;

        }

    }

    if(counttwo == 0){

        if(countunluck - 1 > countluck){

            printf("No\n");

        }else{

            printf("Yes\n");



        }

    }

    else if (counttwo > 0){

        if(counttwo == 1){

            countunluck++;

        }else{

            countluck +=(counttwo/2);

        }



        if(countunluck-1  > countluck){

            printf("No\n");



        }else{

            printf("Yes\n");



        }

    }





    return 0;

}

*/



#include<cstdio>      

const int maxn = 100010;

int luck[maxn] = {0};

int main(){

    int n;

    int countluck = 0;

    int countunluck = 0;

    int counttwo = 0;

    scanf("%d",&n);

    for(int i = 0;i < n;i++){

        scanf("%d",&luck[i]);

        if(luck[i] % 4 == 0){

            countluck++;

        }else if(luck[i] % 2 == 0){

            counttwo++;

        }else{

            countunluck++;

        }

    }

    if(counttwo == 0){

        if(countunluck - 1 > countluck){

            printf("No\n");

        }else{

            printf("Yes\n");



        }

    }

    else if (counttwo > 0){           //将2放在末尾，所以说需要unlucky的数量小于luck的数量

            

        /*if(counttwo == 1){

            countunluck++;

        }else{

            countluck +=(counttwo/2);

        }*/



        if(countunluck > countluck){

            printf("No\n");



        }else{

            printf("Yes\n");



        }

    }





    return 0;

}
// Slower C++ solution:
#include <bits/stdc++.h>



using namespace std;

typedef pair <int, int> pii;



const int maxn = 100001;



int n,a,q,w,e,s;



void input();

void solve();



int main(){

	input();

	solve();

	

	return 0;

}

void input(){

	cin>>n;

	for (int i=0;i<n;i++){

		cin>>a;

		if (a%4==0){

			q++;

		}

		else{

			if (a%2==0){

				w++;

			}

			else{

				e++;

			}

		}

		s++;

	}

	

}

void solve(){

	if (w>0){

		e++;

	}

	while(q>=2 and e>=2){

		q-=2;

		e-=2;

	}

	e--;

	if (e>q){

		cout<<"No";

	}

	else{

		cout<<"Yes";

	}

}

// Faster C++ solution for the same problem (measured speedup: 5.283709872768719x):
/*#include<cstdio>      最后一个测试点过不了，不知道为什么

const int maxn = 100010;

int luck[maxn] = {0};

int main(){

    int n;

    int countluck = 0;

    int countunluck = 0;

    int counttwo = 0;

    scanf("%d",&n);

    for(int i = 0;i < n;i++){

        scanf("%d",&luck[i]);

        if(luck[i] % 4 == 0){

            countluck++;

        }else if(luck[i] % 2 == 0){

            counttwo++;

        }else{

            countunluck++;

        }

    }

    if(counttwo == 0){

        if(countunluck - 1 > countluck){

            printf("No\n");

        }else{

            printf("Yes\n");



        }

    }

    else if (counttwo > 0){

        if(counttwo == 1){

            countunluck++;

        }else{

            countluck +=(counttwo/2);

        }



        if(countunluck-1  > countluck){

            printf("No\n");



        }else{

            printf("Yes\n");



        }

    }





    return 0;

}

*/



#include<cstdio>      

const int maxn = 100010;

int luck[maxn] = {0};

int main(){

    int n;

    int countluck = 0;

    int countunluck = 0;

    int counttwo = 0;

    scanf("%d",&n);

    for(int i = 0;i < n;i++){

        scanf("%d",&luck[i]);

        if(luck[i] % 4 == 0){

            countluck++;

        }else if(luck[i] % 2 == 0){

            counttwo++;

        }else{

            countunluck++;

        }

    }

    if(counttwo == 0){

        if(countunluck - 1 > countluck){

            printf("No\n");

        }else{

            printf("Yes\n");



        }

    }

    else if (counttwo > 0){           //将2放在末尾，所以说需要unlucky的数量小于luck的数量

            

        /*if(counttwo == 1){

            countunluck++;

        }else{

            countluck +=(counttwo/2);

        }*/



        if(countunluck > countluck){

            printf("No\n");



        }else{

            printf("Yes\n");



        }

    }





    return 0;

}
// Slower C++ solution:
#define debug 0

#define test 0

#define CPLUS 1

#include <stdio.h>

#include <string.h>

#include <stdlib.h>

#include <math.h>

#include <string.h>

#if CPLUS

#include <iostream>

#include <stack>

#include <string>

#include<algorithm>

using namespace std;

#endif



int a[100005];





int check(int n1, int n2, int n4)

{

	if (n4 >= n1)

		return 1;

	else if (n1 == n4 + 1 && n2 == 0)

		return 1;

	else

		return 0;

}



int main(void)

{

#if debug

	freopen("in.txt", "r", stdin);

#endif

	int i, n;

	cin >> n;

	int n1=0, n2 = 0, n4 = 0;

	for (i = 0; i < n; i++) {

		cin >> a[i];

		if (a[i] % 4 == 0)

			n4++;

		else if (a[i] % 2 == 0)

			n2++;

		else

			n1++;

	}

#if test

	printf("%d %d %d", n1, n2, n4);

#endif

	if (check(n1, n2, n4))

		printf("Yes\n");

	else

		printf("No\n");

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.279231339463301x):
/*#include<cstdio>      最后一个测试点过不了，不知道为什么

const int maxn = 100010;

int luck[maxn] = {0};

int main(){

    int n;

    int countluck = 0;

    int countunluck = 0;

    int counttwo = 0;

    scanf("%d",&n);

    for(int i = 0;i < n;i++){

        scanf("%d",&luck[i]);

        if(luck[i] % 4 == 0){

            countluck++;

        }else if(luck[i] % 2 == 0){

            counttwo++;

        }else{

            countunluck++;

        }

    }

    if(counttwo == 0){

        if(countunluck - 1 > countluck){

            printf("No\n");

        }else{

            printf("Yes\n");



        }

    }

    else if (counttwo > 0){

        if(counttwo == 1){

            countunluck++;

        }else{

            countluck +=(counttwo/2);

        }



        if(countunluck-1  > countluck){

            printf("No\n");



        }else{

            printf("Yes\n");



        }

    }





    return 0;

}

*/



#include<cstdio>      

const int maxn = 100010;

int luck[maxn] = {0};

int main(){

    int n;

    int countluck = 0;

    int countunluck = 0;

    int counttwo = 0;

    scanf("%d",&n);

    for(int i = 0;i < n;i++){

        scanf("%d",&luck[i]);

        if(luck[i] % 4 == 0){

            countluck++;

        }else if(luck[i] % 2 == 0){

            counttwo++;

        }else{

            countunluck++;

        }

    }

    if(counttwo == 0){

        if(countunluck - 1 > countluck){

            printf("No\n");

        }else{

            printf("Yes\n");



        }

    }

    else if (counttwo > 0){           //将2放在末尾，所以说需要unlucky的数量小于luck的数量

            

        /*if(counttwo == 1){

            countunluck++;

        }else{

            countluck +=(counttwo/2);

        }*/



        if(countunluck > countluck){

            printf("No\n");



        }else{

            printf("Yes\n");



        }

    }





    return 0;

}
// Slower C++ solution:
#include<stdio.h>

#include<string.h>

#include<stdlib.h>

#include<sstream>

#include<iostream>

#include<algorithm>

#include<math.h>

#include<vector>

#include<map> //要学会用map 

#include<queue>

#include<stack>

using namespace std;

/*如果a大于0且b大于0，但相加得到的却是小于等于0的说明是正溢出，这时肯定比c大（因为c肯定在long long的范围内）。

如果a小于0且b小于0，但相加得到的却是大于等于0的说明是负溢出，这是肯定比c小。*/

const int maxn = 10001;

int prime[maxn],pNum = 0;

bool p[maxn] = {0};

void Find_Prime()

{

	for(int i=2;i<maxn;i++)

	{

		if(p[i] ==false)

		{

			prime[pNum++]=i;

			for(int j=i+i;j<maxn;j+=i)

			{

				p[j] = true;

			}

		}

	}

}

int main(){

	int n;

	scanf("%d",&n);

	int count = 0;

	for(int i=0;i<n;i++)

	{

		int temp;

		scanf("%d",&temp);

		if(temp%4==0) count+=2;

		else if(temp%2==0) count+=1;

	}

	if(n%2==0)

	{

		if(count>=n) printf("Yes");

		else printf("No");

	}

	else

	{

		if(count>=n-1) printf("Yes");

		else printf("No");

	}

	return 0;	

}

// Faster C++ solution for the same problem (measured speedup: 5.232481334197199x):
/*#include<cstdio>      最后一个测试点过不了，不知道为什么

const int maxn = 100010;

int luck[maxn] = {0};

int main(){

    int n;

    int countluck = 0;

    int countunluck = 0;

    int counttwo = 0;

    scanf("%d",&n);

    for(int i = 0;i < n;i++){

        scanf("%d",&luck[i]);

        if(luck[i] % 4 == 0){

            countluck++;

        }else if(luck[i] % 2 == 0){

            counttwo++;

        }else{

            countunluck++;

        }

    }

    if(counttwo == 0){

        if(countunluck - 1 > countluck){

            printf("No\n");

        }else{

            printf("Yes\n");



        }

    }

    else if (counttwo > 0){

        if(counttwo == 1){

            countunluck++;

        }else{

            countluck +=(counttwo/2);

        }



        if(countunluck-1  > countluck){

            printf("No\n");



        }else{

            printf("Yes\n");



        }

    }





    return 0;

}

*/



#include<cstdio>      

const int maxn = 100010;

int luck[maxn] = {0};

int main(){

    int n;

    int countluck = 0;

    int countunluck = 0;

    int counttwo = 0;

    scanf("%d",&n);

    for(int i = 0;i < n;i++){

        scanf("%d",&luck[i]);

        if(luck[i] % 4 == 0){

            countluck++;

        }else if(luck[i] % 2 == 0){

            counttwo++;

        }else{

            countunluck++;

        }

    }

    if(counttwo == 0){

        if(countunluck - 1 > countluck){

            printf("No\n");

        }else{

            printf("Yes\n");



        }

    }

    else if (counttwo > 0){           //将2放在末尾，所以说需要unlucky的数量小于luck的数量

            

        /*if(counttwo == 1){

            countunluck++;

        }else{

            countluck +=(counttwo/2);

        }*/



        if(countunluck > countluck){

            printf("No\n");



        }else{

            printf("Yes\n");



        }

    }





    return 0;

}
// Slower C++ solution:
#include <iostream>

#include<stdio.h>

#include<string.h>

#include<stdlib.h>

#include<math.h>

#include<algorithm>

#include<string>

#include<stack>

using namespace std;

typedef  long long LL;

const int maxn=505;

char tmp[maxn];

int dp[maxn][maxn];

int max(int a,int b)

{

    if(a<b)

        return b;

    return a;

}

/*LL gcd(LL a,LL b)

{

    if(b==0)

        return a;

    return gcd(b,a%b);

}

LL lcm(LL a,LL b)

{

    return a/gcd(a,b)*b;

}*/



int main()

{

     int n;

     cin>>n;

     int num_4=0;

     int num_2=0;

     int n2=n;

     while(n2--)

     {

         LL m;

         cin>>m;

         if(m%4==0)

            num_4++;

         else if(m%2==0)

         {

             num_2++;

         }



     }

     int sum=0;

     sum=num_4*2+1;

     if(sum>=n)

     {

          cout<<"Yes"<<endl;

     }

     else

     {  sum+=num_2;

     if(sum>n)

        cout<<"Yes"<<endl;

     else

        cout<<"No"<<endl;



     }





    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.316538642284126x):
/*#include<cstdio>      最后一个测试点过不了，不知道为什么

const int maxn = 100010;

int luck[maxn] = {0};

int main(){

    int n;

    int countluck = 0;

    int countunluck = 0;

    int counttwo = 0;

    scanf("%d",&n);

    for(int i = 0;i < n;i++){

        scanf("%d",&luck[i]);

        if(luck[i] % 4 == 0){

            countluck++;

        }else if(luck[i] % 2 == 0){

            counttwo++;

        }else{

            countunluck++;

        }

    }

    if(counttwo == 0){

        if(countunluck - 1 > countluck){

            printf("No\n");

        }else{

            printf("Yes\n");



        }

    }

    else if (counttwo > 0){

        if(counttwo == 1){

            countunluck++;

        }else{

            countluck +=(counttwo/2);

        }



        if(countunluck-1  > countluck){

            printf("No\n");



        }else{

            printf("Yes\n");



        }

    }





    return 0;

}

*/



#include<cstdio>      

const int maxn = 100010;

int luck[maxn] = {0};

int main(){

    int n;

    int countluck = 0;

    int countunluck = 0;

    int counttwo = 0;

    scanf("%d",&n);

    for(int i = 0;i < n;i++){

        scanf("%d",&luck[i]);

        if(luck[i] % 4 == 0){

            countluck++;

        }else if(luck[i] % 2 == 0){

            counttwo++;

        }else{

            countunluck++;

        }

    }

    if(counttwo == 0){

        if(countunluck - 1 > countluck){

            printf("No\n");

        }else{

            printf("Yes\n");



        }

    }

    else if (counttwo > 0){           //将2放在末尾，所以说需要unlucky的数量小于luck的数量

            

        /*if(counttwo == 1){

            countunluck++;

        }else{

            countluck +=(counttwo/2);

        }*/



        if(countunluck > countluck){

            printf("No\n");



        }else{

            printf("Yes\n");



        }

    }





    return 0;

}
// Slower C++ solution:
#include<bits/stdc++.h> //Ithea Myse Valgulious

namespace chtholly{

typedef long long ll;

#define re0 register int

#define rec register char

#define rel register ll

#define gc getchar

#define pc putchar

#define p32 pc(' ')

#define pl puts("")

/*By Citrus*/

inline int read(){

  int x=0,f=1;char c=gc();

  for (;!isdigit(c);c=gc()) f^=c=='-';

  for (;isdigit(c);c=gc()) x=(x<<3)+(x<<1)+(c^'0');

  return f?x:-x;

  }

template <typename mitsuha>

inline bool read(mitsuha &x){

  x=0;int f=1;char c=gc();

  for (;!isdigit(c)&&~c;c=gc()) f^=c=='-';

  if (!~c) return 0;

  for (;isdigit(c);c=gc()) x=(x<<3)+(x<<1)+(c^'0');

  return x=f?x:-x,1;

  }

template <typename mitsuha>

inline int write(mitsuha x){

  if (!x) return 0&pc(48);

  if (x<0) x=-x,pc('-');

  int bit[20],i,p=0;

  for (;x;x/=10) bit[++p]=x%10;

  for (i=p;i;--i) pc(bit[i]+48);

  return 0;

  }

inline char fuhao(){

  char c=gc();

  for (;isspace(c);c=gc());

  return c;

  }

}using namespace chtholly;

using namespace std;

const int yuzu=1e5;

int cnt,cnt1,cnt2;

int main(){

int n=read();

for (int i=1;i<=n;++i){

  int x=read();

  if (!(x&1)){

    if (!(x>>1&1)){

      ++cnt1;

      }else{

      ++cnt2;

      }

    }

  }

if (cnt2/2+cnt1>=n/2) puts("Yes");

else puts("No");

}

// Faster C++ solution for the same problem (measured speedup: 5.012813631622706x):
#include<stdio.h>

int main(){

	int counta=0,countb=0,countc=0;

	int N;int num[100000];

	scanf("%d",&N);

	for(int i=0;i<N;i++){

		scanf("%d",&num[i]);

		if(num[i]%4==0)

			counta++;

		else if(num[i]%2==0)

			countb++;

		else

			countc++;

	}

	if(counta==countc-1&&counta+countc==N)

		printf("Yes\n");

	else if(counta>=countc)

		printf("Yes\n");

	else

		printf("No\n");

	return 0;

	

}
// Slower C++ solution:
#include<iostream>

using namespace std;

int main()

{

	int n;

	cin>>n;

	int a[n];

	int t1=0,t2=0,t4=0;

	for(int i=0;i<n;i++)

	{

		int b;

		cin>>b;

		if(b%4==0)

		{

			a[i]=4;

			t4++;

		}

		else if(b%2==0)

		{

			a[i]=2;

			t2++;

		}

		else

		{

			a[i]=1;

			t1++;

		}

	}

	if(t4>=t1||(t2==0&&t4+1>=t1))

	{

		cout<<"Yes";

	}

	else

	{

		cout<<"No";

	}

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.085348209126261x):
#include<stdio.h>

int main(){

	int counta=0,countb=0,countc=0;

	int N;int num[100000];

	scanf("%d",&N);

	for(int i=0;i<N;i++){

		scanf("%d",&num[i]);

		if(num[i]%4==0)

			counta++;

		else if(num[i]%2==0)

			countb++;

		else

			countc++;

	}

	if(counta==countc-1&&counta+countc==N)

		printf("Yes\n");

	else if(counta>=countc)

		printf("Yes\n");

	else

		printf("No\n");

	return 0;

	

}
// Slower C++ solution:
//soale C

#include <bits/stdc++.h>

using namespace std;

const int N = 1e5 + 20;

typedef long long ll;

ll n, a[N], c[10], d = 0;

int main(){

	cin >> n;

	for(int i = 0; i < n; i ++){

		cin >> a[i];

		if(a[i] % 4 == 0){

			a[i] = 2;

			c[0] += 1;

		}

		else if(a[i] % 4 == 2){

			a[i] = 1;

			c[1] += 1;

		}

		else{

			a[i] = 0;

			c[2] += 1;

		}

	}

	if(c[1] != 0){

		if(c[2] > c[0]){

			d = 1;

		}

	}

	else{

		if(c[2] > c[0] + 1){

			d = 1;

		}

	}

	if(d == 1){

		cout << "No";

	}

	else{

		cout << "Yes";

	}

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.0851672806218104x):
#include<stdio.h>

int main(){

	int counta=0,countb=0,countc=0;

	int N;int num[100000];

	scanf("%d",&N);

	for(int i=0;i<N;i++){

		scanf("%d",&num[i]);

		if(num[i]%4==0)

			counta++;

		else if(num[i]%2==0)

			countb++;

		else

			countc++;

	}

	if(counta==countc-1&&counta+countc==N)

		printf("Yes\n");

	else if(counta>=countc)

		printf("Yes\n");

	else

		printf("No\n");

	return 0;

	

}
// Slower C++ solution:
#include <bits/stdc++.h>



using namespace std;

typedef pair <int, int> pii;



const int maxn = 100001;



int n,a,q,w,e,s;



void input();

void solve();



int main(){

	input();

	solve();

	

	return 0;

}

void input(){

	cin>>n;

	for (int i=0;i<n;i++){

		cin>>a;

		if (a%4==0){

			q++;

		}

		else{

			if (a%2==0){

				w++;

			}

			else{

				e++;

			}

		}

		s++;

	}

	

}

void solve(){

	if (w>0){

		e++;

	}

	while(q>=2 and e>=2){

		q-=2;

		e-=2;

	}

	e--;

	if (e>q){

		cout<<"No";

	}

	else{

		cout<<"Yes";

	}

}

// Faster C++ solution for the same problem (measured speedup: 5.078338987565243x):
#include<stdio.h>

int main(){

	int counta=0,countb=0,countc=0;

	int N;int num[100000];

	scanf("%d",&N);

	for(int i=0;i<N;i++){

		scanf("%d",&num[i]);

		if(num[i]%4==0)

			counta++;

		else if(num[i]%2==0)

			countb++;

		else

			countc++;

	}

	if(counta==countc-1&&counta+countc==N)

		printf("Yes\n");

	else if(counta>=countc)

		printf("Yes\n");

	else

		printf("No\n");

	return 0;

	

}
// Slower C++ solution:
#define debug 0

#define test 0

#define CPLUS 1

#include <stdio.h>

#include <string.h>

#include <stdlib.h>

#include <math.h>

#include <string.h>

#if CPLUS

#include <iostream>

#include <stack>

#include <string>

#include<algorithm>

using namespace std;

#endif



int a[100005];





int check(int n1, int n2, int n4)

{

	if (n4 >= n1)

		return 1;

	else if (n1 == n4 + 1 && n2 == 0)

		return 1;

	else

		return 0;

}



int main(void)

{

#if debug

	freopen("in.txt", "r", stdin);

#endif

	int i, n;

	cin >> n;

	int n1=0, n2 = 0, n4 = 0;

	for (i = 0; i < n; i++) {

		cin >> a[i];

		if (a[i] % 4 == 0)

			n4++;

		else if (a[i] % 2 == 0)

			n2++;

		else

			n1++;

	}

#if test

	printf("%d %d %d", n1, n2, n4);

#endif

	if (check(n1, n2, n4))

		printf("Yes\n");

	else

		printf("No\n");

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.074034528986012x):
#include<stdio.h>

int main(){

	int counta=0,countb=0,countc=0;

	int N;int num[100000];

	scanf("%d",&N);

	for(int i=0;i<N;i++){

		scanf("%d",&num[i]);

		if(num[i]%4==0)

			counta++;

		else if(num[i]%2==0)

			countb++;

		else

			countc++;

	}

	if(counta==countc-1&&counta+countc==N)

		printf("Yes\n");

	else if(counta>=countc)

		printf("Yes\n");

	else

		printf("No\n");

	return 0;

	

}
// Slower C++ solution:
#include<stdio.h>

#include<string.h>

#include<stdlib.h>

#include<sstream>

#include<iostream>

#include<algorithm>

#include<math.h>

#include<vector>

#include<map> //要学会用map 

#include<queue>

#include<stack>

using namespace std;

/*如果a大于0且b大于0，但相加得到的却是小于等于0的说明是正溢出，这时肯定比c大（因为c肯定在long long的范围内）。

如果a小于0且b小于0，但相加得到的却是大于等于0的说明是负溢出，这是肯定比c小。*/

const int maxn = 10001;

int prime[maxn],pNum = 0;

bool p[maxn] = {0};

void Find_Prime()

{

	for(int i=2;i<maxn;i++)

	{

		if(p[i] ==false)

		{

			prime[pNum++]=i;

			for(int j=i+i;j<maxn;j+=i)

			{

				p[j] = true;

			}

		}

	}

}

int main(){

	int n;

	scanf("%d",&n);

	int count = 0;

	for(int i=0;i<n;i++)

	{

		int temp;

		scanf("%d",&temp);

		if(temp%4==0) count+=2;

		else if(temp%2==0) count+=1;

	}

	if(n%2==0)

	{

		if(count>=n) printf("Yes");

		else printf("No");

	}

	else

	{

		if(count>=n-1) printf("Yes");

		else printf("No");

	}

	return 0;	

}

// Faster C++ solution for the same problem (measured speedup: 5.029101635218451x):
#include<stdio.h>

int main(){

	int counta=0,countb=0,countc=0;

	int N;int num[100000];

	scanf("%d",&N);

	for(int i=0;i<N;i++){

		scanf("%d",&num[i]);

		if(num[i]%4==0)

			counta++;

		else if(num[i]%2==0)

			countb++;

		else

			countc++;

	}

	if(counta==countc-1&&counta+countc==N)

		printf("Yes\n");

	else if(counta>=countc)

		printf("Yes\n");

	else

		printf("No\n");

	return 0;

	

}