stablegradients/pie-gem5-pairs huggingface dataset:
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;

int main()

{long long a,b,x,s,n;

 cin>>a>>b>>x;

 if(a%x==0) s=a/x;

 else s=a/x+1;

 n=b/x;  

 cout<<n-s+1<<endl;

} 

// Faster C++ solution for the same problem (measured speedup: 5.254993030598386x):
#include<cstdio>

long long a,b,x;

long long s,e;

int main()

{

    scanf("%lld%lld%lld",&a,&b,&x);

    if(a%x==0)

		s=a/x;

    else 

		s=a/x+1;

    e=b/x;

    printf("%lld",e-s+1);

    return 0;

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

using namespace std;

long long a,b,x,ans,bns;

int main(){

    cin>>a>>b>>x;

    if(a%x==0) ans=a/x;

    else ans=a/x+1;

    bns=b/x;

    cout<<bns-ans+1<<endl;

    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.254380555278904x):
#include<cstdio>

long long a,b,x;

long long s,e;

int main()

{

    scanf("%lld%lld%lld",&a,&b,&x);

    if(a%x==0)

		s=a/x;

    else 

		s=a/x+1;

    e=b/x;

    printf("%lld",e-s+1);

    return 0;

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

using namespace std;

long long a, b, x, s, e;

int main() {

    cin >> a >> b >> x;

    if (a % x == 0) {

        s = a / x;

    }

    else {

        s = a / x + 1;

    }

    e = b / x;

    cout << e - s + 1;

}

// Faster C++ solution for the same problem (measured speedup: 5.246423497800882x):
#include<cstdio>

long long a,b,x;

long long s,e;

int main()

{

    scanf("%lld%lld%lld",&a,&b,&x);

    if(a%x==0)

		s=a/x;

    else 

		s=a/x+1;

    e=b/x;

    printf("%lld",e-s+1);

    return 0;

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

using namespace std;

long long ans, a, b, x;

int main(){

    cin >> a >> b >> x;

    ans=!(a%x) ? b/x-a/x+1:b/x-a/x;

    cout << ans << endl;

    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.254063653406792x):
#include<cstdio>

long long a,b,x;

long long s,e;

int main()

{

    scanf("%lld%lld%lld",&a,&b,&x);

    if(a%x==0)

		s=a/x;

    else 

		s=a/x+1;

    e=b/x;

    printf("%lld",e-s+1);

    return 0;

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

long long a,b,x,s,t;

int main()

{

    scanf("%lld%lld%lld",&a,&b,&x);

    if(a%x==0)

		s=a/x;

    else

		s=a/x+1;

    t=b/x;

    printf("%lld",t-s+1);

    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.1899121601310165x):
#include<cstdio>

long long a,b,x;

long long s,e;

int main()

{

    scanf("%lld%lld%lld",&a,&b,&x);

    if(a%x==0)

		s=a/x;

    else 

		s=a/x+1;

    e=b/x;

    printf("%lld",e-s+1);

    return 0;

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

long long a,b,x;

long long s,e;

int main(){

    std::cin>>a>>b>>x;

    if(a%x==0)s=a/x;

    else s=a/x+1;

    e=b/x;

    std::cout<<e-s+1;

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.246423497800882x):
#include<cstdio>

long long a,b,x;

long long s,e;

int main()

{

    scanf("%lld%lld%lld",&a,&b,&x);

    if(a%x==0)

		s=a/x;

    else 

		s=a/x+1;

    e=b/x;

    printf("%lld",e-s+1);

    return 0;

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

using namespace std;

int main()

{

    long long a,b,x,start,end;

	cin>>a>>b>>x;

    if(a%x==0) start=a/x;

    else start=a/x+1;

    end=b/x;

    cout<<end-start+1<<endl;

    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.261270067775141x):
#include<cstdio>

long long a,b,x;

int main(){

    scanf("%lld%lld%lld",&a,&b,&x);

    printf("%lld",b/x-(a%x==0?a/x:a/x+1)+1);

    return 0;

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

#include<string>

#include<cstring>

#include<iostream>

#include<algorithm>

using namespace std;



long long a,b,x;



int main()

{

	//fuck

	cin>>a>>b>>x;

	long long ans=(b/x)-(a%x?a/x:a/x-1);

	printf("%lld\n",ans);

}

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



int main(){

	long long a,b,md;

	long long c;

	scanf("%lld %lld %lld", &a,&b,&md);

	if(a%md==0){

		if(a==0)

		{

			c=b/md+1;

		}

		else

		{

			c=(b/md)-(a-1)/md;

		}	

	}

	else

	{

		c=b/md-a/md;

	}

	printf("%lld\n", c);

	

	

	return 0;

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

#include<string>

#include<vector>

#include<algorithm>

#include<cmath>

#include<cstdio>

#include<queue>

#define ll long long

#define PI 2*acos(0.0)

using namespace std;



int main()

{



   // int i,j,k,m,n,val,t=0,test;

    ll a,x,y,ans1,ans2;

    cin>>x>>y>>a;

    if(x==0){

        ans1=0;

        ans2=(y/a)+1;

    }

    else ans1=(x-1)/a,ans2=y/a;;





    cout<<ans2-ans1<<endl;



    //free();   //if pointer array

    return 0;

}


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



int main(){

	long long a,b,md;

	long long c;

	scanf("%lld %lld %lld", &a,&b,&md);

	if(a%md==0){

		if(a==0)

		{

			c=b/md+1;

		}

		else

		{

			c=(b/md)-(a-1)/md;

		}	

	}

	else

	{

		c=b/md-a/md;

	}

	printf("%lld\n", c);

	

	

	return 0;

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

#include<cstring>

#include<cstdlib>

#include<string>

#include<algorithm>

#include<iostream>

#include<stack>

#include<queue>

#include<map>

#include<cmath>

const int maxn = 5e5 + 5;

using namespace std;



long long a,b,x;



int main(){

	scanf("%lld %lld %lld",&a, &b, &x);

	if(a % x == 0 && b % x == 0 && a == b) printf("1\n");

	else if(a == 0 && b != 0) printf("%lld\n", b / x + 1);

	else printf("%lld\n", b / x - (a - 1) / x);

	return 0;

}

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



int main(){

	long long a,b,md;

	long long c;

	scanf("%lld %lld %lld", &a,&b,&md);

	if(a%md==0){

		if(a==0)

		{

			c=b/md+1;

		}

		else

		{

			c=(b/md)-(a-1)/md;

		}	

	}

	else

	{

		c=b/md-a/md;

	}

	printf("%lld\n", c);

	

	

	return 0;

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

using namespace std;

int main(){

	long long a ,b,x;



	cin>>a>>b>>x;

	if(a%x ==0 )

	cout<<((b/x)-((a)/x) )+1;

	else

	cout<<(b/x)-((a)/x);

}

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



int main(){

	long long a,b,md;

	long long c;

	scanf("%lld %lld %lld", &a,&b,&md);

	if(a%md==0){

		if(a==0)

		{

			c=b/md+1;

		}

		else

		{

			c=(b/md)-(a-1)/md;

		}	

	}

	else

	{

		c=b/md-a/md;

	}

	printf("%lld\n", c);

	

	

	return 0;

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

using namespace std;

int main(){

	long long a,b,x;



	cin>>a>>b>>x;

	if(a%x==0)

	cout<<((b/x)-(a/x)+1);

	else

	cout<<(b/x)-(a/x);

}

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



int main(){

	long long a,b,md;

	long long c;

	scanf("%lld %lld %lld", &a,&b,&md);

	if(a%md==0){

		if(a==0)

		{

			c=b/md+1;

		}

		else

		{

			c=(b/md)-(a-1)/md;

		}	

	}

	else

	{

		c=b/md-a/md;

	}

	printf("%lld\n", c);

	

	

	return 0;

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

using namespace std;

int main()

{

	long long a,b,x,w;

	scanf("%lld%lld%lld",&a,&b,&x);

	if(a==0)

	w=(b/x)+1;

	else{

		w=(b/x)-(a-1)/x;

	}

	cout<<w;

	

}

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



int main(){

	long long a,b,md;

	long long c;

	scanf("%lld %lld %lld", &a,&b,&md);

	if(a%md==0){

		if(a==0)

		{

			c=b/md+1;

		}

		else

		{

			c=(b/md)-(a-1)/md;

		}	

	}

	else

	{

		c=b/md-a/md;

	}

	printf("%lld\n", c);

	

	

	return 0;

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

using namespace std;

int main(){

long long a;

long long b;

long long c;

long long n=0;

cin>>a>>b>>c;

n=(b/c)-(a/c);

if(a%c==0)

++n;

cout<<n;

}

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



int main(){

	long long a,b,md;

	long long c;

	scanf("%lld %lld %lld", &a,&b,&md);

	if(a%md==0){

		if(a==0)

		{

			c=b/md+1;

		}

		else

		{

			c=(b/md)-(a-1)/md;

		}	

	}

	else

	{

		c=b/md-a/md;

	}

	printf("%lld\n", c);

	

	

	return 0;

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

using namespace std;

int main()

{

	long long a,b,x,r;

	scanf("%lld%lld%lld",&a,&b,&x);

	if(a==0)

	{

		r=(b/x)+1;

	}	else

		r=(b/x)-(a-1)/x;

		

		printf("%lld",r);

		return 0;

}

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



int main(){

	long long a,b,md;

	long long c;

	scanf("%lld %lld %lld", &a,&b,&md);

	if(a%md==0){

		if(a==0)

		{

			c=b/md+1;

		}

		else

		{

			c=(b/md)-(a-1)/md;

		}	

	}

	else

	{

		c=b/md-a/md;

	}

	printf("%lld\n", c);

	

	

	return 0;

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

using namespace std;

int main(){

	long long a,b,x,d;

	cin>>a>>b>>x;

	if(a==0){

		d=(b/x)+1;

		

	}else{

	

	d=(b/x)-(a-1)/x;}

	cout<<d;

} 

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



int main(){

	long long a,b,md;

	long long c;

	scanf("%lld %lld %lld", &a,&b,&md);

	if(a%md==0){

		if(a==0)

		{

			c=b/md+1;

		}

		else

		{

			c=(b/md)-(a-1)/md;

		}	

	}

	else

	{

		c=b/md-a/md;

	}

	printf("%lld\n", c);

	

	

	return 0;

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

using namespace std;

long long int solve()

{

    long long int a,b,res,x;

    scanf("%lld %lld %lld",&a,&b,&x);

    res=b/x;

    if(a==0)

    {

        return res+1;

    }

    return res-((a-1)/x);

}

int main()

{

    long long int r=solve();

    cout<<r<<endl;

    return 0;

}


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



int main(){

	long long a,b,md;

	long long c;

	scanf("%lld %lld %lld", &a,&b,&md);

	if(a%md==0){

		if(a==0)

		{

			c=b/md+1;

		}

		else

		{

			c=(b/md)-(a-1)/md;

		}	

	}

	else

	{

		c=b/md-a/md;

	}

	printf("%lld\n", c);

	

	

	return 0;

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

using namespace std;

int main()

{

	long long a,b,x,ans;

	scanf("%lld%lld%lld",&a,&b,&x);

	if(a==0){

		ans=(b/x)+1;}

	else

	{

		ans=((b/x)-(a-1)/x);

	}

	cout<<ans;

	return 0;

}

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



int main(){

	long long a,b,md;

	long long c;

	scanf("%lld %lld %lld", &a,&b,&md);

	if(a%md==0){

		if(a==0)

		{

			c=b/md+1;

		}

		else

		{

			c=(b/md)-(a-1)/md;

		}	

	}

	else

	{

		c=b/md-a/md;

	}

	printf("%lld\n", c);

	

	

	return 0;

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

#include<stdio.h>

using namespace std;

int main(){

long long a,b,x;

scanf("%lld%lld%lld",&a,&b,&x);

if (a==0)

cout<<(b/x)+1;

else

cout<<(b/x-(a-1)/x);

}


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



int main(){

	long long a,b,md;

	long long c;

	scanf("%lld %lld %lld", &a,&b,&md);

	if(a%md==0){

		if(a==0)

		{

			c=b/md+1;

		}

		else

		{

			c=(b/md)-(a-1)/md;

		}	

	}

	else

	{

		c=b/md-a/md;

	}

	printf("%lld\n", c);

	

	

	return 0;

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

using namespace std;

int main()

{

    long long int a,b,x,i,B;

    cin>>a>>b>>x;



    if(a%x==0)

    {

        B=((b/x)-(a/x))+1;

        cout<<B<<endl;

    }

    else

    {

         B=((b/x)-(a/x));

        cout<<B<<endl;

    }

    return 0;

}


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



int main(){

	long long a,b,md;

	long long c;

	scanf("%lld %lld %lld", &a,&b,&md);

	if(a%md==0){

		if(a==0)

		{

			c=b/md+1;

		}

		else

		{

			c=(b/md)-(a-1)/md;

		}	

	}

	else

	{

		c=b/md-a/md;

	}

	printf("%lld\n", c);

	

	

	return 0;

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

using namespace std;

const int N=1e5+5;

int a[N];

int main()

{

    int n;

    cin>>n;

    int cnt4=0,cnt2=0;

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

    {

        cin>>a[i];

        a[i]%=4;

        if(a[i]==0)

            cnt4++;

        else if(a[i]==2)

            cnt2++;

    }

    int cnt=n-cnt2-cnt4;

    if(cnt2)

    {

        if(cnt4>=cnt){

            cout<<"Yes";

            return 0;

        }

    }

    else

    {

        if(cnt4&&(cnt4+1>=cnt)){

            cout<<"Yes";

            return 0;

        }

    }

    cout<<"No";

    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.287203470106063x):
#include <cstdio>

const int MAXN = 100010;

int n, a[MAXN];

bool isLucky() {

	int num1 = 0, num4 = 0;

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

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

			num4++;

		}

		if (a[i] % 2 != 0) {

			num1++;

		}

	}

	if (num4 >= n / 2) {

		return true;

	} 

	if (num4 == num1) {

		return true;

	}

	return false;

}

int main() {

	scanf("%d", &n);

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

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

	}

	if (isLucky()) {

		printf("Yes\n");

	} else {

		printf("No\n");

	}

	return 0;

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

using namespace std;

typedef long long ll;

typedef pair<int, int> pii;

typedef pair<ll, ll> pll;

const int INF = 1e9;

const ll LINF = 1e18;



/*

<url:https://arc080.contest.atcoder.jp/tasks/arc080_a>

問題文============================================================

 長さ N の数列 a=(a1,a2,…,aN) があります。 各 ai は正の整数です。

 

 すぬけ君の目標は、a の要素を自由に並べ替え、次の条件が成り立つようにすることです。

 

 各 1≤i≤N−1 について、ai と ai+1 の積は 4 の倍数である。

 すぬけ君が目標を達成できるか判定してください。



=================================================================



解説=============================================================



 まず、4の倍数の数値(4の倍数を v 、４の倍数でない値を x とする）が存在する時

 

 x v x v x v x v ... とおいていけば条件を満たす

 つまり、4の倍数である値の個数を V とすると 2*V 分カバーできる

 

 注意：

     x v x v x v ... x v x

 で数列が終了する時 2*V + 1 ＝＝　N をカバーできる

 

 2*c で　数列全てをカバーできない時, ２の倍数をb とすると

 

 x v x v x v x v ... x v b b b b b b .... b

 

 とおいていけば条件を満たす

 

 よって上の注意ケースを除いて,２の倍数の個数とBとすると

 

 2*V + B >= N

 

 となっていれば条件を満たす



================================================================

*/

int main(void) {

	cin.tie(0); ios::sync_with_stdio(false);

    ll N; cin >> N;

    vector<ll> a(N);

    for(auto & in:a) cin >> in;

    ll four = 0, two = 0;

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

        if(a[i]%4 == 0) four++;

        if(a[i]%2 == 0) two++;

    }

    two -= four;

    if(four*2 + 1 >= N){

        cout << "Yes" << endl;

        return 0;

    }

    if(four*2 + two >= N){

        cout << "Yes" << endl;

    }else{

        cout << "No" << endl;

    }

	return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.420897665166784x):
#include <cstdio>

const int MAXN = 100010;

int n, a[MAXN];

bool isLucky() {

	int num1 = 0, num4 = 0;

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

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

			num4++;

		}

		if (a[i] % 2 != 0) {

			num1++;

		}

	}

	if (num4 >= n / 2) {

		return true;

	} 

	if (num4 == num1) {

		return true;

	}

	return false;

}

int main() {

	scanf("%d", &n);

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

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

	}

	if (isLucky()) {

		printf("Yes\n");

	} else {

		printf("No\n");

	}

	return 0;

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

    using namespace std;

    int n, dp[10000000], c = 0, cnt = 0;

    int main()

    {

      cin >> n;

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

      {

            cin >> dp[i];

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

                  c ++;

            else

            if(dp[i] % 2 == 0)

                  cnt ++;

      }



      if((c + cnt / 2) >= n / 2)

            cout << "Yes";

      else

            cout << "No";

     }


// Faster C++ solution for the same problem (measured speedup: 5.244221260753795x):
#include <cstdio>

const int MAXN = 100010;

int n, a[MAXN];

bool isLucky() {

	int num1 = 0, num4 = 0;

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

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

			num4++;

		}

		if (a[i] % 2 != 0) {

			num1++;

		}

	}

	if (num4 >= n / 2) {

		return true;

	} 

	if (num4 == num1) {

		return true;

	}

	return false;

}

int main() {

	scanf("%d", &n);

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

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

	}

	if (isLucky()) {

		printf("Yes\n");

	} else {

		printf("No\n");

	}

	return 0;

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



using namespace std;



int n , a , ch , d;



int main()

{

	cin >> n;

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

	{

		cin >> a;

		if(a % 4 == 0)

			ch++;

		else if(a % 2 == 0)

			d++;

	}

	if(ch >= n / 2)

		cout << "Yes";

	else

	{

		if(d >= n - (ch * 2))

			cout << "Yes";

		else

			cout << "No";

	}

}

// Faster C++ solution for the same problem (measured speedup: 5.243565758128234x):
#include <cstdio>

const int MAXN = 100010;

int n, a[MAXN];

bool isLucky() {

	int num1 = 0, num4 = 0;

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

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

			num4++;

		}

		if (a[i] % 2 != 0) {

			num1++;

		}

	}

	if (num4 >= n / 2) {

		return true;

	} 

	if (num4 == num1) {

		return true;

	}

	return false;

}

int main() {

	scanf("%d", &n);

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

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

	}

	if (isLucky()) {

		printf("Yes\n");

	} else {

		printf("No\n");

	}

	return 0;

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

using namespace std;

const int Maxn=1e5+100;

int n,a,k,out[Maxn];

vector <int> vec1,vec2,vec4;

int main(){

	cin>>n;

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

		cin>>a;

		if(a%4==0)

			vec4.push_back(a);

		else if(a%2==0)

			vec2.push_back(a);

		else

			vec1.push_back(a);

	}

	k=4;

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

		if(k==1){

			if(vec4.size()==0){

				cout<<"No";

				return 0;

			}

			vec4.pop_back();

			k=4;

		}

		else if(k==2){

			if(vec2.size()!=0)

				vec2.pop_back(),k=2;

			else if(vec4.size()!=0)

				vec4.pop_back(),k=4;

			else{

				cout<<"No";

				return 0;

			}

		}

		else if(k==4){

			if(vec1.size()!=0)

				vec1.pop_back(),k=1;

			else if(vec2.size()!=0)

				vec2.pop_back(),k=2;

			else if(vec4.size()!=0)

				vec4.pop_back(),k=4;

		}

	}

	cout<<"Yes";

}


// Faster C++ solution for the same problem (measured speedup: 5.3033624838595905x):
#include <cstdio>

const int MAXN = 100010;

int n, a[MAXN];

bool isLucky() {

	int num1 = 0, num4 = 0;

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

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

			num4++;

		}

		if (a[i] % 2 != 0) {

			num1++;

		}

	}

	if (num4 >= n / 2) {

		return true;

	} 

	if (num4 == num1) {

		return true;

	}

	return false;

}

int main() {

	scanf("%d", &n);

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

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

	}

	if (isLucky()) {

		printf("Yes\n");

	} else {

		printf("No\n");

	}

	return 0;

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

#include <cstdio>

#include <cstring>

#include <cmath>

#include <algorithm>

#include <ctype.h>

#include <vector>

#include <map>

using namespace std;

typedef long long LL;

#define INF 0x3fffffff

#define MAXSIZE 100005

//const double eps=1e-8;

//#define Equ(a,b) ((fabs((a)-(b)))<(eps))

//const double pi=acos(-1.0);



int main(){

    int n;

    int a0=0,a1=0,a2=0;

    scanf("%d",&n);

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

        int b;

        scanf("%d",&b);

        if (b%4==0) {

            a2++;

        }

        else if (b%2==0){

            a1++;

        }

        else{

            a0++;

        }

    }

    if (a1==0&&a2>=a0-1) {

        printf("Yes\n");

    }

    else if (a2>=a0){

        printf("Yes\n");

    }

    else{

        printf("No\n");

    }

    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.227829351161x):
#include <cstdio>

const int MAXN = 100010;

int n, a[MAXN];

bool isLucky() {

	int num1 = 0, num4 = 0;

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

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

			num4++;

		}

		if (a[i] % 2 != 0) {

			num1++;

		}

	}

	if (num4 >= n / 2) {

		return true;

	} 

	if (num4 == num1) {

		return true;

	}

	return false;

}

int main() {

	scanf("%d", &n);

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

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

	}

	if (isLucky()) {

		printf("Yes\n");

	} else {

		printf("No\n");

	}

	return 0;

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

using namespace std;

const int N = 1e2+9;

const double pi = acos(-1.0);

#define ll long long

ll dp[N];

ll a[N];

ll n,m,d,x;

int _,__,___;

int main()

{

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

   cin>>n;

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

   {

       int t;

       cin>>t;

       if(t%4==0) _++;

       else if(t%2==0) __++;

       else ___++;

   }

   if(_>=(n>>1) || _ >= ___) cout<<"Yes"<<endl;

   else cout<<"No"<<endl;

    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.312228553443319x):
#include <cstdio>

const int MAXN = 100010;

int n, a[MAXN];

bool isLucky() {

	int num1 = 0, num4 = 0;

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

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

			num4++;

		}

		if (a[i] % 2 != 0) {

			num1++;

		}

	}

	if (num4 >= n / 2) {

		return true;

	} 

	if (num4 == num1) {

		return true;

	}

	return false;

}

int main() {

	scanf("%d", &n);

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

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

	}

	if (isLucky()) {

		printf("Yes\n");

	} else {

		printf("No\n");

	}

	return 0;

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

using namespace std;

const int N = 1e2+9;

const double pi = acos(-1.0);

#define ll long long

//ll dp[N];

//ll a[N];

ll n,m,d,x;

int _,__,___;

int main()

{

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

  

ios::sync_with_stdio(false);

 cin>>n;

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

   {

       int t;

       cin>>t;

       if(t%4==0) _++;

       else if(t%2==0) __++;

       else ___++;

   }

   if(_>=(n>>1) || _ >= ___) cout<<"Yes"<<endl;

   else cout<<"No"<<endl;

    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.377629668593175x):
#include <cstdio>

const int MAXN = 100010;

int n, a[MAXN];

bool isLucky() {

	int num1 = 0, num4 = 0;

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

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

			num4++;

		}

		if (a[i] % 2 != 0) {

			num1++;

		}

	}

	if (num4 >= n / 2) {

		return true;

	} 

	if (num4 == num1) {

		return true;

	}

	return false;

}

int main() {

	scanf("%d", &n);

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

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

	}

	if (isLucky()) {

		printf("Yes\n");

	} else {

		printf("No\n");

	}

	return 0;

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

using namespace std;



int main(){

	int n;cin >> n;

	int cnt = 0,cnt1 = 0, cnt2= 0;

	int a;

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

		cin >> a;

		if(a% 4 == 0) cnt ++;

		else{

			if(a&1) cnt1++;

			else cnt2++;

		}

	}

	if(cnt2>0 && cnt1<=cnt)

		printf("Yes\n");

	else if(cnt2==0 && cnt1<=cnt+1)

		printf("Yes\n");

	else

		printf("No\n");



	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.274288356265565x):
#include <cstdio>

const int MAXN = 100010;

int n, a[MAXN];

bool isLucky() {

	int num1 = 0, num4 = 0;

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

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

			num4++;

		}

		if (a[i] % 2 != 0) {

			num1++;

		}

	}

	if (num4 >= n / 2) {

		return true;

	} 

	if (num4 == num1) {

		return true;

	}

	return false;

}

int main() {

	scanf("%d", &n);

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

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

	}

	if (isLucky()) {

		printf("Yes\n");

	} else {

		printf("No\n");

	}

	return 0;

}