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

using namespace std;

typedef long long ll;

int main(){

	int n,x; cin>>n;

	ll tot_a=0, tot_b=0;

	vector<int>a(n),b(n);

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

		cin>>a[i];

	}

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

		cin>>b[i];

		if(a[i]<b[i]){

			int diff=b[i]-a[i];

			if(diff%2){

				tot_a+=(diff+1)/2;

				tot_b++;

			}

			else tot_a+=(diff/2);

		}

		else 

			tot_b+= (a[i]-b[i]);

	}

	if(tot_a>=tot_b) 

		cout<<"Yes\n";

	else

		cout<<"No\n";

	return 0;

}

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

#include<algorithm>

using namespace std;

typedef long long ll;

int n;

ll a[10100], b[10100];

ll atot = 0, btot = 0;

int main()

{

	scanf("%d", &n);

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

	{

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

		atot += a[i];

	}

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

	{

		scanf("%lld", &b[i]);

		btot += b[i];

	}

	if (atot > btot) { printf("No\n"); return 0; }

	int p = 1;

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

	{

		if (a[i] > b[i])

		{

			while (p <= n && (b[p] - a[p]) / 2 <= 0) p++;

			if (p > n)

			{

				printf("No\n"); return 0;

			}

			ll t = min(a[i] - b[i], (b[p] - a[p]) / 2);

			b[i] += t; a[p] += (2 * t);

			i--;

			continue;

		}

	}

	bool flag = false;

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

	{

		if (a[i] > b[i]) { flag = true; break; }

	}

	if (flag) printf("No\n");

	else printf("Yes\n");

	return 0;

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

#include<cstdio>

#include<cmath>

#define maxn 10005

using namespace std;

long long a[maxn],b[maxn],n,A,B;

int main()

{

 cin>>n;

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

     cin>>a[i];

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

    {

	 cin>>b[i];

     if(a[i]>b[i]) 

	    B+=(a[i]-b[i]);

   	 else if(a[i]<b[i]) 

		     A+=(b[i]-a[i])/2;

    }

 if(A>=B) 

    cout<<"Yes";

 else 

    cout<<"No";

 return 0;

} 

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

using namespace std;

int n,a[10005],b[10005];

long long sum1,sum2,delta,qwq;

int main()

{

  scanf("%d",&n);

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

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

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

    scanf("%d",&b[i]),sum2+=b[i];

  if(sum1>sum2)  {printf("No");return 0;}

  delta=sum2-sum1;

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

    if(b[i]>a[i])

      qwq+=(b[i]+1-a[i])/2;

  if(qwq>delta)  printf("No");

  else  printf("Yes");

  return 0;

}
// Slower C++ solution:
// Create: 2018-03-24 08:34:33

#include <bits/stdc++.h>



using namespace std;



const int N = 1e5 + 5;



int n;

int a[N], b[N];



int main()

{

	cin >> n;

	long long sa = 0, sb = 0, sum = 0;

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

		cin >> a[i];

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

		cin >> b[i];

		if(a[i] > b[i]) {

			sum += a[i] - b[i];

		} else {

			sum -= (b[i] - a[i]) / 2;

		}

	}

	if(sum > 0) {

		puts("No");

	} else {

		puts("Yes");

	}

	return 0;

}


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

#include <cmath>

using namespace std;



typedef long long ll;



const int kMaxN = 2e4 + 5;

ll n, k, a[kMaxN], b[kMaxN];



int main() {

  scanf("%lld", &n);

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

    scanf("%lld", a + i);

    k -= a[i];

  }

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

    scanf("%lld", b + i);

    k += b[i];

  }

  ll sum = 0;

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

    if (b[i] > a[i])

      sum = sum + (b[i] - a[i] + (b[i] - a[i]) % 2) / 2;

  puts(sum <= k ? "Yes" : "No");

  return 0;

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

using namespace std;



typedef long long ll;



const int maxn = 2e4 + 5;



int n;

ll c1, c2;

int a[maxn], b[maxn];



int main()

{

	scanf("%d", &n);

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

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

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

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

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

	{

		b[i] -= a[i];

		if(b[i] < 0)

			c1 -= b[i];

		else

			c2 += b[i] / 2;

	}

	if(c1 > c2)

		puts("No");

	else

		puts("Yes");

	return 0;

}

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

#include <cmath>

using namespace std;



typedef long long ll;



const int kMaxN = 2e4 + 5;

ll n, k, a[kMaxN], b[kMaxN];



int main() {

  scanf("%lld", &n);

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

    scanf("%lld", a + i);

    k -= a[i];

  }

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

    scanf("%lld", b + i);

    k += b[i];

  }

  ll sum = 0;

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

    if (b[i] > a[i])

      sum = sum + (b[i] - a[i] + (b[i] - a[i]) % 2) / 2;

  puts(sum <= k ? "Yes" : "No");

  return 0;

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

#include<cstdio>

#include<cmath>

#define maxn 10005

using namespace std;

long long a[maxn],b[maxn],n,A,B;

int main()

{cin>>n;

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

   cin>>a[i];

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

   {cin>>b[i];

    if(a[i]>b[i]) B+=(a[i]-b[i]);

   	  else if(a[i]<b[i]) A+=(b[i]-a[i])/2;

   }

 if(A>=B) cout<<"Yes";

   else cout<<"No";

 return 0;

} 

// Faster C++ solution for the same problem (measured speedup: 5.267664151679972x):
#include "cstdio"

int a[10005],b[10005],i,n;long long s1,s2;

int main(){

	scanf("%d",&n);

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

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

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

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

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

		if(a[i]>b[i])s1+=a[i]-b[i];

		if(a[i]<b[i])s2+=(b[i]-a[i])>>1;

	}

	if(s1<=s2)printf("Yes\n");

	else printf("No\n");

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

#define ll long long

const int N=1e4+5;

ll a[N],b[N];

signed main(){

    int n;scanf("%d",&n);

    for(int i=1;i<=n;i++)scanf("%lld",&a[i]);

    for(int i=1;i<=n;i++)scanf("%lld",&b[i]);

    ll s1=0,s2=0;

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

        if(a[i]>b[i])s1+=a[i]-b[i];

        if(a[i]<b[i])s2+=(b[i]-a[i])>>1;}

    puts(s1<=s2?"Yes":"No");

    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.2044002960455105x):
#include "cstdio"

int a[10005],b[10005],i,n;long long s1,s2;

int main(){

	scanf("%d",&n);

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

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

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

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

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

		if(a[i]>b[i])s1+=a[i]-b[i];

		if(a[i]<b[i])s2+=(b[i]-a[i])>>1;

	}

	if(s1<=s2)printf("Yes\n");

	else printf("No\n");

}
// Slower C++ solution:
//测试......

#include<bits/stdc++.h>

using namespace std;

typedef long long ll;

int n;

int a[10005],b[10005];

ll sum1,sum2;

ll delta,qwq;

int main() {

	cin>>n;

	for(int i=1; i<=n; i++) cin>>a[i],sum1+=a[i];

	for(int i=1; i<=n; i++) cin>>b[i],sum2+=b[i];

	if(sum1>sum2) {

		cout<<"No";

		return 0;

	}

	delta=sum2-sum1;

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

		if(b[i]>a[i])

			qwq+=(b[i]+1-a[i])/2;

	if(qwq>delta) cout<<"No";

	else cout<<"Yes";

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.268349489515907x):
#include "cstdio"

int a[10005],b[10005],i,n;long long s1,s2;

int main(){

	scanf("%d",&n);

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

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

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

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

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

		if(a[i]>b[i])s1+=a[i]-b[i];

		if(a[i]<b[i])s2+=(b[i]-a[i])>>1;

	}

	if(s1<=s2)printf("Yes\n");

	else printf("No\n");

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

#include<cstdio>

#include<cmath>

#define maxn 10005

using namespace std;

long long a[maxn],b[maxn],n,A,B;

int main()

{cin>>n;

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

   cin>>a[i];

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

   {cin>>b[i];

    if(a[i]>b[i]) B+=(a[i]-b[i]);

   	  else if(a[i]<b[i]) A+=(b[i]-a[i])/2;

   }

 if(A>=B) cout<<"Yes";

   else cout<<"No";

 return 0;

} 

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

#define N 10001



int a[N], b[N];



int main() 

{

    int n, i;

    long long x = 0, y = 0;

    

    scanf("%d", &n);

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

    	scanf("%d", a + i);

	}

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

    	scanf("%d", b + i);

	}

	 

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

		if(a[i] > b[i]) x += a[i] - b[i];

		else y += (b[i] - a[i]) >> 1;

	}

    if(x <= y) puts("Yes");

    else puts("No");

    

    return 0;

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

using namespace std;



int main()

{

    int n; cin>>n;

    vector<long> a(n); for(auto& e: a) cin>>e;

    vector<long> b(n); for(auto& e: b) cin>>e;



    for(int T=0; T<10000; ++T) {

        long x=0;

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

            if (a[i]<b[i]) {

                long t=(b[i]-a[i]+1)/2;

                x+=t;

                a[i]+=2*t;

            }

        }

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

            if (a[i]>b[i] && x>0) {

                long t=min(x, a[i]-b[i]);

                b[i]+=t;

                x-=t;

            }

        }

    }

    cout<<(a==b ? "Yes" : "No")<<endl;

}


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

using namespace std;



int main()

{

    int n; cin>>n;

    vector<long> a(n); for(auto& e: a) cin>>e;

    vector<long> b(n); for(auto& e: b) cin>>e;



    long sa=0, sb=0, d=0;

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

        if (a[i]<b[i]) d+=(b[i]-a[i]+1)/2;

        sa+=a[i];

        sb+=b[i];

    }

    cout<<(d<=sb-sa ? "Yes" : "No")<<endl;

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

#define ll long long

#define N 10005

using namespace std;

ll n,a[N],b[N],s;

int main()

{

	scanf("%lld",&n);

	for(int i=1;i<=n;i++) scanf("%lld",&a[i]), s-=a[i];

	for(int i=1;i<=n;i++) scanf("%lld",&b[i]), s+=b[i];

	if(s<0) return puts("No"), 0;

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

	{

		if(a[i]<b[i])

		{

			s-=(b[i]-a[i]+1)/2;

			if(s<0) return puts("No"), 0;

		}

	}

	puts("Yes");

}

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

#include <cstring>  

#include <queue>

#include <stack> 

#include <algorithm>  

using namespace std; 

long long N,a[10010],b[10010],c[10010],i,j,s,ax,bx,t;      

int main()  

{ 

	

	scanf("%lld",&N);

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

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

	for(s=ax=bx=i=0;i<N;i++)

	{

		scanf("%lld",&b[i]);

		c[i]=b[i]-a[i];

		if(c[i]>0)

		{

			bx+=c[i];

			if(c[i]%2)

				s++;

		}			

		else

			ax+=c[i];

	}

	if((bx-s)/2>=(-ax)&&(bx>(-ax)||(bx==0&&ax==0)))

		printf("Yes\n");

	else

		printf("No\n");

	return 0; 

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

#define ll long long

#define N 10005

using namespace std;

ll n,a[N],b[N],s;

int main()

{

	scanf("%lld",&n);

	for(int i=1;i<=n;i++) scanf("%lld",&a[i]), s-=a[i];

	for(int i=1;i<=n;i++) scanf("%lld",&b[i]), s+=b[i];

	if(s<0) return puts("No"), 0;

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

	{

		if(a[i]<b[i])

		{

			s-=(b[i]-a[i]+1)/2;

			if(s<0) return puts("No"), 0;

		}

	}

	puts("Yes");

}

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



using namespace std;



int a[100001],b[100001];

int main(){

	int n;

	scanf("%d",&n);

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

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

	long long s1=0,s2=0,s3=0;

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

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

		a[i]-=b[i];

		s1+=a[i];

		if(a[i]>0)s2+=a[i];

		if(a[i]<0)s3+=-(a[i]/2);

	}

	if(s2>s3||s2>-s1){

		printf("No\n");

		return 0;

	}

	printf("Yes\n");

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

using namespace std;

const int MAXN = 10005;

int a[MAXN], b[MAXN];



int main()

{

    int n;

    long long int diff1 = 0, diff2 = 0;



    cin >> n;



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

        cin >> a[i] ;

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

        cin >> b[i] ;



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

    {

        if(a[i] >= b[i])

        {

            diff1 += a[i] - b[i] ;

        }

        else

        {

            //int t = b[i] - a[i];

            //if(t & 1)

            //    t -= 1;

            diff2 += (b[i] - a[i]) / 2 * 2;

        }

    }



    if(diff2 / 2 >= diff1)

        cout << "Yes" << endl ;

    else

        cout << "No" << endl ;



    return 0;

}


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



using namespace std;



int a[100001],b[100001];

int main(){

	int n;

	scanf("%d",&n);

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

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

	long long s1=0,s2=0,s3=0;

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

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

		a[i]-=b[i];

		s1+=a[i];

		if(a[i]>0)s2+=a[i];

		if(a[i]<0)s3+=-(a[i]/2);

	}

	if(s2>s3||s2>-s1){

		printf("No\n");

		return 0;

	}

	printf("Yes\n");

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



const int MAXN = 1e4 + 5;



int n, A[MAXN], B[MAXN];

long long a = 0, b = 0;



int main() {

    scanf("%d", &n);

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

        static int x;

        scanf("%d", &x);

        a += x;

        A[i] = x;

    }

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

        static int x;

        scanf("%d", &x);

        b += x;

        B[i] = x;

    }

    

    if (a > b) puts("No");

    else if (a == b) {

        bool flag = 1;

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

            if (A[i] != B[i]) {

                flag = 0; break;

            }

        puts(flag ? "Yes" : "No");

    } else {

        long long t1 = b - a, t2 = b - a;

        bool flag = 1;

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

            if (A[i] < B[i]) {

                if ((A[i] & 1) != (B[i] & 1)) {

                    if (!t2) {

                        flag = 0; break;

                    }

                    --t2; ++B[i];

                }

                if (t1 < (B[i] - A[i]) / 2) {

                    flag = 0; break;

                }

                t1 -= (B[i] - A[i]) / 2;

            } else {

                if (t2 < A[i] - B[i]) {

                    flag = 0; break;

                }

                t2 -= A[i] - B[i];

            }

        }

        puts(flag ? "Yes" : "No");

    }

    

    return 0;

}

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



using namespace std;



int a[100001],b[100001];

int main(){

	int n;

	scanf("%d",&n);

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

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

	long long s1=0,s2=0,s3=0;

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

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

		a[i]-=b[i];

		s1+=a[i];

		if(a[i]>0)s2+=a[i];

		if(a[i]<0)s3+=-(a[i]/2);

	}

	if(s2>s3||s2>-s1){

		printf("No\n");

		return 0;

	}

	printf("Yes\n");

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

#define ll long long

#define N 10005

using namespace std;

ll n,a[N],b[N],s;

int main()

{

	scanf("%lld",&n);

	for(int i=1;i<=n;i++) scanf("%lld",&a[i]), s-=a[i];

	for(int i=1;i<=n;i++) scanf("%lld",&b[i]), s+=b[i];

	if(s<0) return puts("No"), 0;

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

	{

		if(a[i]<b[i])

		{

			s-=(b[i]-a[i]+1)/2;

			if(s<0) return puts("No"), 0;

		}

	}

	puts("Yes");

}

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

#include<algorithm>

#define maxn 10005

#define LL long long

using namespace std;

int n;

LL a[maxn],b[maxn],s;

int main()

{

	scanf("%d",&n);

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

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

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

		scanf("%lld",&b[i]);

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

		if(a[i]>b[i]) s+=1ll*(a[i]-b[i]);

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

		if(a[i]<b[i])

		{

			int t=(b[i]-a[i])/2;

			s-=t;

		}

	printf("%s\n",s<=0?"Yes":"No");

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

using namespace std;

const int MAXN = 10005;

int a[MAXN], b[MAXN];



int main()

{

    int n;

    long long int diff1 = 0, diff2 = 0;



    cin >> n;



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

        cin >> a[i] ;

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

        cin >> b[i] ;



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

    {

        if(a[i] >= b[i])

        {

            diff1 += a[i] - b[i] ;

        }

        else

        {

            //int t = b[i] - a[i];

            //if(t & 1)

            //    t -= 1;

            diff2 += (b[i] - a[i]) / 2 * 2;

        }

    }



    if(diff2 / 2 >= diff1)

        cout << "Yes" << endl ;

    else

        cout << "No" << endl ;



    return 0;

}


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

#include<algorithm>

#define maxn 10005

#define LL long long

using namespace std;

int n;

LL a[maxn],b[maxn],s;

int main()

{

	scanf("%d",&n);

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

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

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

		scanf("%lld",&b[i]);

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

		if(a[i]>b[i]) s+=1ll*(a[i]-b[i]);

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

		if(a[i]<b[i])

		{

			int t=(b[i]-a[i])/2;

			s-=t;

		}

	printf("%s\n",s<=0?"Yes":"No");

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



const int MAXN = 1e4 + 5;



int n, A[MAXN], B[MAXN];

long long a = 0, b = 0;



int main() {

    scanf("%d", &n);

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

        static int x;

        scanf("%d", &x);

        a += x;

        A[i] = x;

    }

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

        static int x;

        scanf("%d", &x);

        b += x;

        B[i] = x;

    }

    

    if (a > b) puts("No");

    else if (a == b) {

        bool flag = 1;

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

            if (A[i] != B[i]) {

                flag = 0; break;

            }

        puts(flag ? "Yes" : "No");

    } else {

        long long t1 = b - a, t2 = b - a;

        bool flag = 1;

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

            if (A[i] < B[i]) {

                if ((A[i] & 1) != (B[i] & 1)) {

                    if (!t2) {

                        flag = 0; break;

                    }

                    --t2; ++B[i];

                }

                if (t1 < (B[i] - A[i]) / 2) {

                    flag = 0; break;

                }

                t1 -= (B[i] - A[i]) / 2;

            } else {

                if (t2 < A[i] - B[i]) {

                    flag = 0; break;

                }

                t2 -= A[i] - B[i];

            }

        }

        puts(flag ? "Yes" : "No");

    }

    

    return 0;

}

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

#include<algorithm>

#define maxn 10005

#define LL long long

using namespace std;

int n;

LL a[maxn],b[maxn],s;

int main()

{

	scanf("%d",&n);

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

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

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

		scanf("%lld",&b[i]);

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

		if(a[i]>b[i]) s+=1ll*(a[i]-b[i]);

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

		if(a[i]<b[i])

		{

			int t=(b[i]-a[i])/2;

			s-=t;

		}

	printf("%s\n",s<=0?"Yes":"No");

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

#define ll long long

#define N 10005

using namespace std;

ll n,a[N],b[N],s;

int main()

{

	scanf("%lld",&n);

	for(int i=1;i<=n;i++) scanf("%lld",&a[i]), s-=a[i];

	for(int i=1;i<=n;i++) scanf("%lld",&b[i]), s+=b[i];

	if(s<0) return puts("No"), 0;

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

	{

		if(a[i]<b[i])

		{

			s-=(b[i]-a[i]+1)/2;

			if(s<0) return puts("No"), 0;

		}

	}

	puts("Yes");

}

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

#include<cstring>

using namespace std;

typedef long long LL;

const int maxn=1e4+10;

LL a[maxn],b[maxn];



int main()

{

	int n;

	while(scanf("%d",&n)!=EOF)

	{

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

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

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

			scanf("%lld",&b[j]);



		bool flag=true;

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

		{

			if(b[i]<a[i])

			{

				LL temp=a[i]-b[i];

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

				{

					if(b[j]>=a[j]+2)

					{

						LL cha=b[j]-a[j];

						LL cnt=cha/2;

						if(cnt>=temp)

						{

							a[j]+=temp*2;

							temp=0;

						}

						else

						{

							a[j]+=cnt*2;

							temp-=cnt;

						}

					}

				}

				if(temp!=0)

				{

					flag=false;break;

				}

			}

		}

		if(flag) printf("Yes\n");

		else printf("No\n");

	}

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

using namespace std;

const int MAXN = 10005;

int a[MAXN], b[MAXN];



int main()

{

    int n;

    long long int diff1 = 0, diff2 = 0;



    cin >> n;



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

        cin >> a[i] ;

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

        cin >> b[i] ;



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

    {

        if(a[i] >= b[i])

        {

            diff1 += a[i] - b[i] ;

        }

        else

        {

            //int t = b[i] - a[i];

            //if(t & 1)

            //    t -= 1;

            diff2 += (b[i] - a[i]) / 2 * 2;

        }

    }



    if(diff2 / 2 >= diff1)

        cout << "Yes" << endl ;

    else

        cout << "No" << endl ;



    return 0;

}


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

#include<cstring>

using namespace std;

typedef long long LL;

const int maxn=1e4+10;

LL a[maxn],b[maxn];



int main()

{

	int n;

	while(scanf("%d",&n)!=EOF)

	{

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

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

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

			scanf("%lld",&b[j]);



		bool flag=true;

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

		{

			if(b[i]<a[i])

			{

				LL temp=a[i]-b[i];

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

				{

					if(b[j]>=a[j]+2)

					{

						LL cha=b[j]-a[j];

						LL cnt=cha/2;

						if(cnt>=temp)

						{

							a[j]+=temp*2;

							temp=0;

						}

						else

						{

							a[j]+=cnt*2;

							temp-=cnt;

						}

					}

				}

				if(temp!=0)

				{

					flag=false;break;

				}

			}

		}

		if(flag) printf("Yes\n");

		else printf("No\n");

	}

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



const int MAXN = 1e4 + 5;



int n, A[MAXN], B[MAXN];

long long a = 0, b = 0;



int main() {

    scanf("%d", &n);

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

        static int x;

        scanf("%d", &x);

        a += x;

        A[i] = x;

    }

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

        static int x;

        scanf("%d", &x);

        b += x;

        B[i] = x;

    }

    

    if (a > b) puts("No");

    else if (a == b) {

        bool flag = 1;

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

            if (A[i] != B[i]) {

                flag = 0; break;

            }

        puts(flag ? "Yes" : "No");

    } else {

        long long t1 = b - a, t2 = b - a;

        bool flag = 1;

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

            if (A[i] < B[i]) {

                if ((A[i] & 1) != (B[i] & 1)) {

                    if (!t2) {

                        flag = 0; break;

                    }

                    --t2; ++B[i];

                }

                if (t1 < (B[i] - A[i]) / 2) {

                    flag = 0; break;

                }

                t1 -= (B[i] - A[i]) / 2;

            } else {

                if (t2 < A[i] - B[i]) {

                    flag = 0; break;

                }

                t2 -= A[i] - B[i];

            }

        }

        puts(flag ? "Yes" : "No");

    }

    

    return 0;

}

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

#include<cstring>

using namespace std;

typedef long long LL;

const int maxn=1e4+10;

LL a[maxn],b[maxn];



int main()

{

	int n;

	while(scanf("%d",&n)!=EOF)

	{

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

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

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

			scanf("%lld",&b[j]);



		bool flag=true;

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

		{

			if(b[i]<a[i])

			{

				LL temp=a[i]-b[i];

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

				{

					if(b[j]>=a[j]+2)

					{

						LL cha=b[j]-a[j];

						LL cnt=cha/2;

						if(cnt>=temp)

						{

							a[j]+=temp*2;

							temp=0;

						}

						else

						{

							a[j]+=cnt*2;

							temp-=cnt;

						}

					}

				}

				if(temp!=0)

				{

					flag=false;break;

				}

			}

		}

		if(flag) printf("Yes\n");

		else printf("No\n");

	}

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



using namespace std;



int main()

{

    char a;

    cin >> a;

    cout << char (a+1);



    return 0;

}


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

int main()

    {

        char ch;



        scanf("%c",&ch);



        ch=ch+1;



        printf("%c",ch);



        return 0;



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



using namespace std;



int main()

{

    char a;

    cin >> a;

    cout << char (a+1);



    return 0;

}


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

int main()

{

	char a;

	scanf("%c",&a);

	printf("%c",a+1);

}