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

using namespace std;

int main() {

	int n,x[100001],y[100001],a[100001];

	cin>>n;

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

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

		if(x[i]+y[i]>a[i]||(a[i]-x[i]-y[i])%2!=0) {

			cout<<"No";

			goto no;

		}

	cout<<"Yes";

	no:

	return 0;

}

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



int main()

{

    int n,t,x,y;

    scanf("%d",&n);

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

    {

        scanf("%d%d%d",&t,&x,&y);

        if(x+y>t)

        {

            printf("No\n");

            return 0;

        }

        if((x+y)%2==0&&t%2==1)

        {

            printf("No\n");

            return 0;

        }

        if((x+y)%2==1&&t%2==0)

        {

            printf("No\n");

            return 0;

        }

    }

    printf("Yes\n");

    return 0;

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

using namespace std;

int n,t,x,y;

int main()

{

    cin>>n;

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

	{

        cin>>t>>x>>y;

        if(!(x+y<=t&&(t-x-y)%2==0))

		{

            cout<<"No"<<endl;

            return 0;

        }

    }

    cout<<"Yes"<<endl;

    return 0;

}

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



int main()

{

    int n,t,x,y;

    scanf("%d",&n);

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

    {

        scanf("%d%d%d",&t,&x,&y);

        if(x+y>t)

        {

            printf("No\n");

            return 0;

        }

        if((x+y)%2==0&&t%2==1)

        {

            printf("No\n");

            return 0;

        }

        if((x+y)%2==1&&t%2==0)

        {

            printf("No\n");

            return 0;

        }

    }

    printf("Yes\n");

    return 0;

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

using namespace std;

int main(){

    int n,x[100005],y[100005],t[100005];

    cin>>n;

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

        cin>>t[i]>>x[i]>>y[i];

    }

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

    	if(x[i]+y[i]>t[i]||(t[i]-x[i]-y[i])%2!=0){

            cout<<"No";

            return 0;   

        }

	}

        

        cout<<"Yes";

        return 0;

}

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



int main()

{

    int n,t,x,y;

    scanf("%d",&n);

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

    {

        scanf("%d%d%d",&t,&x,&y);

        if(x+y>t)

        {

            printf("No\n");

            return 0;

        }

        if((x+y)%2==0&&t%2==1)

        {

            printf("No\n");

            return 0;

        }

        if((x+y)%2==1&&t%2==0)

        {

            printf("No\n");

            return 0;

        }

    }

    printf("Yes\n");

    return 0;

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

using namespace std;

int main(){

int n,t,x,y;

cin>>n;

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

cin>>t>>x>>y;

if((x+y>t)||((x+y)%2==0&&t%2==1)||((x+y)%2==1&&t%2==0)){

cout<<"No"<<endl;

return 0;}

}

cout<<"Yes"<<endl;}

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



int main()

{

    int n,t,x,y;

    scanf("%d",&n);

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

    {

        scanf("%d%d%d",&t,&x,&y);

        if(x+y>t)

        {

            printf("No\n");

            return 0;

        }

        if((x+y)%2==0&&t%2==1)

        {

            printf("No\n");

            return 0;

        }

        if((x+y)%2==1&&t%2==0)

        {

            printf("No\n");

            return 0;

        }

    }

    printf("Yes\n");

    return 0;

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



using namespace std;



int main(){

    int n;

    cin>>n;

    int x=0,y=0;

    int t=0;

    int a,b,c;

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

    {

        cin>>c>>a>>b;

        if(abs(x-a)+abs(y-b)>c-t)

        {

            cout<<"No";

            return 0;

        }

        if((abs(x-a)+abs(y-b))%2==0 &&(c-t)%2==1)

        {

            cout<<"No";

            return 0;

        }

        if((abs(x-a)+abs(y-b))%2==1 &&(c-t)%2==0)

        {

            cout<<"No";

            return 0;

        }

        x=a;y=b;t=c;

    }

    cout<<"Yes";

    return 0;

}

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



int main()

{

    int n,t,x,y;

    scanf("%d",&n);

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

    {

        scanf("%d%d%d",&t,&x,&y);

        if(x+y>t)

        {

            printf("No\n");

            return 0;

        }

        if((x+y)%2==0&&t%2==1)

        {

            printf("No\n");

            return 0;

        }

        if((x+y)%2==1&&t%2==0)

        {

            printf("No\n");

            return 0;

        }

    }

    printf("Yes\n");

    return 0;

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

using namespace std;

int dis(int a,int b)

{

	return a+b;

}

int main()

{

	int n;

	scanf("%d",&n);

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

	{

		int t,x,y,d;

		scanf("%d %d %d",&t,&x,&y);

		d=dis(x,y);

		if((t<d)||(t&1)!=(d&1))

		{

			puts("No");

			return 0;

		}

	}

	puts("Yes");

	return 0;

}




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



int main()

{

    int n,t,x,y;

    scanf("%d",&n);

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

    {

        scanf("%d%d%d",&t,&x,&y);

        if(x+y>t)

        {

            printf("No\n");

            return 0;

        }

        if((x+y)%2==0&&t%2==1)

        {

            printf("No\n");

            return 0;

        }

        if((x+y)%2==1&&t%2==0)

        {

            printf("No\n");

            return 0;

        }

    }

    printf("Yes\n");

    return 0;

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



using std::cin;

using std::cout;



inline int dis( int x , int y )

{

	return x + y;

}



int main( void )

{

	int T;

	cin >> T;

	int buf1 , buf2 , buf3;

	while( T-- )

	{

		cin >> buf1 >> buf2 >> buf3;

		if( buf1 < dis( buf2 , buf3 ) )

		{

			cout << "No\n";

			return 0;

		}

		if( ( buf1 - dis( buf2 , buf3 ) ) & 1 )

		{

			cout << "No\n";

			return 0;

		}

	} 

	cout << "Yes\n";

}

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



int main()

{

    int n,t,x,y;

    scanf("%d",&n);

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

    {

        scanf("%d%d%d",&t,&x,&y);

        if(x+y>t)

        {

            printf("No\n");

            return 0;

        }

        if((x+y)%2==0&&t%2==1)

        {

            printf("No\n");

            return 0;

        }

        if((x+y)%2==1&&t%2==0)

        {

            printf("No\n");

            return 0;

        }

    }

    printf("Yes\n");

    return 0;

}
// Slower C++ solution:
// luogu-judger-enable-o2

#include<iostream>

#include<algorithm>

#include<cstdio>

using namespace std;

int sabs(int a){

    if(a<0)return a*-1;

    return a;

}

int main(){

    int n,x=0,y=0,t=0;

    cin>>n;

    while(n--){

        int c,a,b;

        cin>>c>>a>>b;

        if(abs(x-a)+abs(y-b)>c-t){

            cout<<"No";

            return 0;

        }

        if((abs(x-a)+abs(y-b))%2==0 &&(c-t)%2==1){

            cout<<"No";

            return 0;

        }

        if((abs(x-a)+abs(y-b))%2==1 &&(c-t)%2==0){

            cout<<"No";

            return 0;

        }

        x=a;y=b;t=c;

    }

    cout<<"Yes"<<endl;

    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.2907524767927026x):


#include<cstdio>

using namespace std;

int main()

{

    int n,t,x,y;

    scanf("%d",&n);

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

    {

        scanf("%d%d%d",&t,&x,&y);

        if(x+y>t)//???,???????????

        {

            printf("No\n");

            return 0;

        }

        if((x+y)%2==0&&t%2==1)//??????????

        {

            printf("No\n");

            return 0;

        }

        if((x+y)%2==1&&t%2==0)//??

        {

            printf("No\n");

            return 0;

        }

    }

    printf("Yes\n");//????No??return 0?,???????Yes?

    return 0;

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

#include<cmath>

#include<stack>

#include<cstdio>

#include<queue>

#include<vector>

#include<cstring>

#include<iostream>

#include<algorithm>

using namespace std;

typedef long long ll;

int n,t,x,y,a,b,ans;

int main(){

	scanf("%d",&n);

	while(n--){

		scanf("%d%d%d",&t,&a,&b);

		if(abs(x-a)+abs(y-b)>t-ans||((abs(x-a)+abs(y-b))%2!=(t-ans)%2)){

			puts("No");

			return 0;

		}

		x=a,y=b,ans=t;

	}

	puts("Yes");

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.233844113000914x):


#include<cstdio>

using namespace std;

int main()

{

    int n,t,x,y;

    scanf("%d",&n);

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

    {

        scanf("%d%d%d",&t,&x,&y);

        if(x+y>t)//???,???????????

        {

            printf("No\n");

            return 0;

        }

        if((x+y)%2==0&&t%2==1)//??????????

        {

            printf("No\n");

            return 0;

        }

        if((x+y)%2==1&&t%2==0)//??

        {

            printf("No\n");

            return 0;

        }

    }

    printf("Yes\n");//????No??return 0?,???????Yes?

    return 0;

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

using namespace std;

int main()

{

	int n;

	cin>>n;

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

	{

		int t,x,y;

		cin>>t>>x>>y;

		t-=x+y;

		if(t<0||t%2)

			return!(cout<<"No\n");

	}

	return!(cout<<"Yes\n");

}

// Faster C++ solution for the same problem (measured speedup: 5.284527869688537x):


#include<cstdio>

using namespace std;

int main()

{

    int n,t,x,y;

    scanf("%d",&n);

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

    {

        scanf("%d%d%d",&t,&x,&y);

        if(x+y>t)//???,???????????

        {

            printf("No\n");

            return 0;

        }

        if((x+y)%2==0&&t%2==1)//??????????

        {

            printf("No\n");

            return 0;

        }

        if((x+y)%2==1&&t%2==0)//??

        {

            printf("No\n");

            return 0;

        }

    }

    printf("Yes\n");//????No??return 0?,???????Yes?

    return 0;

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

#include<iostream>

#include<algorithm>

#include<cmath>

#include<map>

#include<queue>

#include<stack>

#include<list>

#include<set>

#include<cstring>

#include<string>

using namespace std;

int main(){

    int n;

    scanf("%d",&n);

    int t=0,x=0,y=0,a,b,c;

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

        scanf("%d %d %d",&c,&a,&b);

        if(abs(x-a)+abs(y-b)>c-t){

            printf("No\n");

            return 0;

        }

        if((abs(x-a)+abs(y-b))%2!=(c-t)%2){

            printf("No\n");

            return 0;

        }

        x=a;y=b;t=c;

    }

    printf("Yes\n");

    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.234420677990746x):


#include<cstdio>

using namespace std;

int main()

{

    int n,t,x,y;

    scanf("%d",&n);

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

    {

        scanf("%d%d%d",&t,&x,&y);

        if(x+y>t)//???,???????????

        {

            printf("No\n");

            return 0;

        }

        if((x+y)%2==0&&t%2==1)//??????????

        {

            printf("No\n");

            return 0;

        }

        if((x+y)%2==1&&t%2==0)//??

        {

            printf("No\n");

            return 0;

        }

    }

    printf("Yes\n");//????No??return 0?,???????Yes?

    return 0;

}
// Slower C++ solution:
// luogu-judger-enable-o2

#include<bits/stdc++.h>

using namespace std;

int main()

{

    int n,t,x,y;

    cin>>n;

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

    {

        cin>>t>>x>>y;

        if(t<x+y)

        {

            cout<<"No"<<endl;

            return 0;

        }

        if((!((x+y)%2)&&t%2)||((x+y)%2&&!(t%2)))

        {

            cout<<"No"<<endl;

            return 0;

        }

    }

    cout<<"Yes"<<endl;

    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.305590306986894x):


#include<cstdio>

using namespace std;

int main()

{

    int n,t,x,y;

    scanf("%d",&n);

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

    {

        scanf("%d%d%d",&t,&x,&y);

        if(x+y>t)//???,???????????

        {

            printf("No\n");

            return 0;

        }

        if((x+y)%2==0&&t%2==1)//??????????

        {

            printf("No\n");

            return 0;

        }

        if((x+y)%2==1&&t%2==0)//??

        {

            printf("No\n");

            return 0;

        }

    }

    printf("Yes\n");//????No??return 0?,???????Yes?

    return 0;

}
// Slower C++ solution:
// luogu-judger-enable-o2

#include<iostream>

#include<algorithm>

#include<cstdio>

using namespace std;

int sabs(int a){

    if(a<0)return a*-1;

    return a;

}

int main(){

    int n,x=0,y=0,t=0;

    cin>>n;

    while(n--){

        int c,a,b;

        cin>>c>>a>>b;

        if(abs(x-a)+abs(y-b)>c-t){

            cout<<"No";

            return 0;

        }

        if((abs(x-a)+abs(y-b))%2==0 &&(c-t)%2==1){

            cout<<"No";

            return 0;

        }

        if((abs(x-a)+abs(y-b))%2==1 &&(c-t)%2==0){

            cout<<"No";

            return 0;

        }

        x=a;y=b;t=c;

    }

    cout<<"Yes"<<endl;

    return 0;

}

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

#include <algorithm>

using namespace std;

int n;

int main()

{

	scanf("%d",&n);

	int t,x,y;

	bool tmp=1;

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

	{

		scanf("%d%d%d",&t,&x,&y);

		if(t<x+y||(t-x-y)%2!=0)

			{

				tmp=0; break;

			}

	}

	if(tmp) printf("Yes");

	else printf("No");

	return 0;

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

#include<cmath>

#include<stack>

#include<cstdio>

#include<queue>

#include<vector>

#include<cstring>

#include<iostream>

#include<algorithm>

using namespace std;

typedef long long ll;

int n,t,x,y,a,b,ans;

int main(){

	scanf("%d",&n);

	while(n--){

		scanf("%d%d%d",&t,&a,&b);

		if(abs(x-a)+abs(y-b)>t-ans||((abs(x-a)+abs(y-b))%2!=(t-ans)%2)){

			puts("No");

			return 0;

		}

		x=a,y=b,ans=t;

	}

	puts("Yes");

	return 0;

}

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

#include <algorithm>

using namespace std;

int n;

int main()

{

	scanf("%d",&n);

	int t,x,y;

	bool tmp=1;

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

	{

		scanf("%d%d%d",&t,&x,&y);

		if(t<x+y||(t-x-y)%2!=0)

			{

				tmp=0; break;

			}

	}

	if(tmp) printf("Yes");

	else printf("No");

	return 0;

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

using namespace std;

int main()

{

	int n;

	cin>>n;

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

	{

		int t,x,y;

		cin>>t>>x>>y;

		t-=x+y;

		if(t<0||t%2)

			return!(cout<<"No\n");

	}

	return!(cout<<"Yes\n");

}

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

#include <algorithm>

using namespace std;

int n;

int main()

{

	scanf("%d",&n);

	int t,x,y;

	bool tmp=1;

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

	{

		scanf("%d%d%d",&t,&x,&y);

		if(t<x+y||(t-x-y)%2!=0)

			{

				tmp=0; break;

			}

	}

	if(tmp) printf("Yes");

	else printf("No");

	return 0;

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

#include<iostream>

#include<algorithm>

#include<cmath>

#include<map>

#include<queue>

#include<stack>

#include<list>

#include<set>

#include<cstring>

#include<string>

using namespace std;

int main(){

    int n;

    scanf("%d",&n);

    int t=0,x=0,y=0,a,b,c;

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

        scanf("%d %d %d",&c,&a,&b);

        if(abs(x-a)+abs(y-b)>c-t){

            printf("No\n");

            return 0;

        }

        if((abs(x-a)+abs(y-b))%2!=(c-t)%2){

            printf("No\n");

            return 0;

        }

        x=a;y=b;t=c;

    }

    printf("Yes\n");

    return 0;

}

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

#include <algorithm>

using namespace std;

int n;

int main()

{

	scanf("%d",&n);

	int t,x,y;

	bool tmp=1;

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

	{

		scanf("%d%d%d",&t,&x,&y);

		if(t<x+y||(t-x-y)%2!=0)

			{

				tmp=0; break;

			}

	}

	if(tmp) printf("Yes");

	else printf("No");

	return 0;

}
// Slower C++ solution:
// luogu-judger-enable-o2

#include<bits/stdc++.h>

using namespace std;

int main()

{

    int n,t,x,y;

    cin>>n;

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

    {

        cin>>t>>x>>y;

        if(t<x+y)

        {

            cout<<"No"<<endl;

            return 0;

        }

        if((!((x+y)%2)&&t%2)||((x+y)%2&&!(t%2)))

        {

            cout<<"No"<<endl;

            return 0;

        }

    }

    cout<<"Yes"<<endl;

    return 0;

}

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

#include <algorithm>

using namespace std;

int n;

int main()

{

	scanf("%d",&n);

	int t,x,y;

	bool tmp=1;

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

	{

		scanf("%d%d%d",&t,&x,&y);

		if(t<x+y||(t-x-y)%2!=0)

			{

				tmp=0; break;

			}

	}

	if(tmp) printf("Yes");

	else printf("No");

	return 0;

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

using namespace std;

int main(){

	int n,t,x,y,i;

	cin >> n;

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

	    cin >> t >> x >> y;

	    if(abs(-x)+abs(-y)>t || abs(-x)+abs(-y)<=t && (abs(-x)+abs(-y))%2!=t%2){

	        cout << "No" << endl;

	        return 0;

	    }

	}

	cout << "Yes" << endl;

	return 0;

} 

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

#include <algorithm>

using namespace std;

int n;

int main()

{

	scanf("%d",&n);

	int t,x,y;

	bool tmp=1;

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

	{

		scanf("%d%d%d",&t,&x,&y);

		if(t<x+y||(t-x-y)%2!=0)

			{

				tmp=0; break;

			}

	}

	if(tmp) printf("Yes");

	else printf("No");

	return 0;

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

using namespace std;

int main(){

	int n,t,x,y,i;

	scanf("%d",&n);

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

		scanf("%d%d%d",&t,&x,&y);

		if(x+y>t||(x+y+t)%2==1){

			printf("No\n");

			return 0;

		}

	}

	printf("Yes\n");

	return 0;

}

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

#include <algorithm>

using namespace std;

int n;

int main()

{

	scanf("%d",&n);

	int t,x,y;

	bool tmp=1;

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

	{

		scanf("%d%d%d",&t,&x,&y);

		if(t<x+y||(t-x-y)%2!=0)

			{

				tmp=0; break;

			}

	}

	if(tmp) printf("Yes");

	else printf("No");

	return 0;

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

using namespace std;

int main()

{

	int i,j,k=0,n;

	cin>>n;

	int a[n],x[n],y[n];

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

	{

		j=0;

		cin>>a[i]>>x[i]>>y[i];

		j+=x[i];

		j+=y[i];

		//cout<<j<<" "<<a[i]<<endl;

		if((a[i]-j)%2!=0||j>a[i])

		{

			k=1;

		}

	}	

	if(k==0)

	cout<<"Yes"<<endl;

	else

	cout<<"No"<<endl; 

	return 0;

} 

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

#include <algorithm>

using namespace std;

int n;

int main()

{

	scanf("%d",&n);

	int t,x,y;

	bool tmp=1;

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

	{

		scanf("%d%d%d",&t,&x,&y);

		if(t<x+y||(t-x-y)%2!=0)

			{

				tmp=0; break;

			}

	}

	if(tmp) printf("Yes");

	else printf("No");

	return 0;

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

const int N=100001;

using namespace std;

int main(){

    int n,x[N],y[N],t[N];

    cin>>n;

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

        cin>>t[i]>>x[i]>>y[i];

    }

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

        if(x[i]+y[i]>t[i]||(t[i]-x[i]-y[i])%2!=0){//判断，如果不行直接输出“No”

        cout<<"No";

            return 0;   

            }

            cout<<"Yes";

            return 0;

}

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

#include <algorithm>

using namespace std;

int n;

int main()

{

	scanf("%d",&n);

	int t,x,y;

	bool tmp=1;

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

	{

		scanf("%d%d%d",&t,&x,&y);

		if(t<x+y||(t-x-y)%2!=0)

			{

				tmp=0; break;

			}

	}

	if(tmp) printf("Yes");

	else printf("No");

	return 0;

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

using namespace std;

int main()

{

    int n,t,x,y;

    cin>>n;

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

    {

        cin>>t>>x>>y;

        if(x+y>t)

        {

            cout<<"No\n";

            return 0;

        }

        if( (x+y)%2==0&&t%2==1 )

        {

            cout<<"No\n";

            return 0;

        }

        if( (x+y)%2==1&&t%2==0 )

        {

            cout<<" No\n";

            return 0;

        }

    }

    cout<<" Yes\n";

    return 0;

}

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

#include <algorithm>

using namespace std;

int n;

int main()

{

	scanf("%d",&n);

	int t,x,y;

	bool tmp=1;

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

	{

		scanf("%d%d%d",&t,&x,&y);

		if(t<x+y||(t-x-y)%2!=0)

			{

				tmp=0; break;

			}

	}

	if(tmp) printf("Yes");

	else printf("No");

	return 0;

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

using namespace std;

int main()

{

	int n;

	cin>>n;

	while(n--)

	{

		int t,x,y;

		cin>>t>>x>>y;

		if(t<x+y || (t-x-y)%2){cout<<"No\n";return 0;}

	}

	cout<<"Yes\n";

}

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

#include <algorithm>

using namespace std;

int n;

int main()

{

	scanf("%d",&n);

	int t,x,y;

	bool tmp=1;

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

	{

		scanf("%d%d%d",&t,&x,&y);

		if(t<x+y||(t-x-y)%2!=0)

			{

				tmp=0; break;

			}

	}

	if(tmp) printf("Yes");

	else printf("No");

	return 0;

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

const int N=100001;

using namespace std;

int main(){

    int n,x[N],y[N],t[N];

    cin>>n;

    for(int i=1;i<=n;i++) cin>>t[i]>>x[i]>>y[i];

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

        if(x[i]+y[i]>t[i]||(t[i]-x[i]-y[i])%2!=0){cout<<"No"; return 0;}   

        cout<<"Yes";

}

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

#include <algorithm>

using namespace std;

int n;

int main()

{

	scanf("%d",&n);

	int t,x,y;

	bool tmp=1;

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

	{

		scanf("%d%d%d",&t,&x,&y);

		if(t<x+y||(t-x-y)%2!=0)

			{

				tmp=0; break;

			}

	}

	if(tmp) printf("Yes");

	else printf("No");

	return 0;

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

using namespace std;

int n,t,x,y;

int main()

{

  int n,x,y,z,i;	

  cin>>n;

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

  {

    cin>>x>>y>>z;

    if(!(y+z<=x&&(x-y-z)%2==0))

	{

      cout<<"No"<<endl;

      return 0;

    }

  }

  cout<<"Yes"<<endl;

  return 0;

}

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

#include <algorithm>

using namespace std;

int n;

int main()

{

	scanf("%d",&n);

	int t,x,y;

	bool tmp=1;

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

	{

		scanf("%d%d%d",&t,&x,&y);

		if(t<x+y||(t-x-y)%2!=0)

			{

				tmp=0; break;

			}

	}

	if(tmp) printf("Yes");

	else printf("No");

	return 0;

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

#include <string>

using namespace std;

int main()

{

    int n;

    cin >> n;

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

    {

        int a,b,c;

        cin >> a >> b >> c;

        b+=c;

        if(a < b||(a-b)%2 == 1){cout << "No" << endl;return 0;}

    }

    cout << "Yes" << endl;

    return 0;

}


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

#include <algorithm>

using namespace std;

int n;

int main()

{

	scanf("%d",&n);

	int t,x,y;

	bool tmp=1;

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

	{

		scanf("%d%d%d",&t,&x,&y);

		if(t<x+y||(t-x-y)%2!=0)

			{

				tmp=0; break;

			}

	}

	if(tmp) printf("Yes");

	else printf("No");

	return 0;

}