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

using namespace std;

int n,t,x,y;

int main()

{

    cin>>n;

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

    {

        cin>>t>>x>>y;

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

        {

            cout<<"No\n";

            return 0;

        }

    }

    cout<<"Yes\n";

}




// Faster C++ solution for the same problem (measured speedup: 5.249680480895127x):
#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");

    return 0;

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

#include <cmath>

using namespace std;

int ans=0;

int main(){

	int i,j,k,n;

	cin>>n;

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

		int t,x,y;

		cin>>t>>x>>y;

		if((x+y)%2==t%2&&t>=x+y)ans++; 

	}

	if(ans==n)cout<<"Yes"<<endl;

	else cout<<"No"<<endl;

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.306118398990108x):
#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");

    return 0;

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

#include<cstdio>

using namespace std;

int n,t,x,y;

int main()

{

	scanf("%d",&n);

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

	{

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

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

		{

			printf("No\n");

			return 0;

		}

	}

	printf("Yes\n");

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.236444530748073x):
#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");

    return 0;

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

#include<cmath>

using namespace std;

int n,t,x,y,nt,nx,ny;

int main()

{

	cin>>n;

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

	{

		cin>>t>>x>>y;

        if((((int)abs(nx-x)+(int)abs(ny-y))%2==0 &&(t-nt)%2==1)||(((int)abs(nx-x)+(int)abs(ny-y))%2==1 &&(t-nt)%2==0)||(abs(nx-x)+abs(ny-y)>t-nt))

        {

            cout<<"No";

            return 0;

        }

        nx=x;ny=y;nt=t;

	}

	cout<<"Yes"<<endl;

}

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



int main()

{

    int n,t,x,y,i;

    scanf("%d",&n);

    for(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,t=0,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"<<endl;

            return 0;

        }

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

        {

            cout<<"No"<<endl;

            return 0;

        }

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

        {

            cout<<"No"<<endl;

            return 0;

        }

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

    }

    cout<<"Yes"<<endl;

    return 0;

}

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



int main()

{

    int n,t,x,y,i;

    scanf("%d",&n);

    for(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 ab(int a){

	if(a>=0) return a;

	return -a;

}



int main(){

	int n,nt=0,x=0,y=0,t,a,b; cin>>n;

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

		cin>>t>>a>>b;

		if(ab(a-x)+ab(b-y)>t-nt) { cout<<"No"<<endl; return 0; }

		if((ab(a-x)+ab(b-y))%2!=(t-nt)%2) { cout<<"No"<<endl; return 0; }

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

	}

	cout<<"Yes"<<endl;

	return 0;

}

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



int main()

{

    int n,t,x,y,i;

    scanf("%d",&n);

    for(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,a,b,c;

    cin>>n;

    while(cin>>a>>b>>c){

        if(b+c>a) return cout<<"No"<<endl,0;

        if((b+c)%2==0 && a%2) return cout<<"No"<<endl,0;

        if((b+c)%2 && a%2==0) return cout<<"No"<<endl,0;

    }

    cout<<"Yes"<<endl;

    return 0;

}

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



int main()

{

    int n,t,x,y,i;

    scanf("%d",&n);

    for(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 m;

    cin>>m;

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

    {

        int t,x,y;

        cin>>t>>x>>y;

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

        {cout<<"No";return 0;}

    }

    cout<<"Yes";return 0;

}

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



int main()

{

    int n,t,x,y,i;

    scanf("%d",&n);

    for(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>

#include<cstdio>

using namespace std;

int n,a,b,c;

bool flag=1;

int main()

{

	cin>>n;

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

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

	 a=a-c-b;

	 if(a<0||(a%2==1))

	 flag=0;

	}

    if(flag==0)

	{cout<<"No";

	}

	else

	cout<<"Yes";

	return 0;	

}

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



int main()

{

    int n,t,x,y,i;

    scanf("%d",&n);

    for(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)

        {

            cout<<"No"<<endl;

            return 0;

        }

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

        {

            cout<<"No"<<endl;

            return 0;

        }

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

        {

            cout<<"No"<<endl;

            return 0;

        }

    }

    cout<<"Yes"<<endl;

    return 0;

}

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



int main()

{

    int n,t,x,y,i;

    scanf("%d",&n);

    for(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>

#define E exit(0);

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)puts("No"),E

        if((x+y)%2==0&&t%2)puts("No"),E

        if((x+y)%2&&t%2==0)puts("No"),E

    }

    puts("Yes");E

}

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



int main()

{

    int n,t,x,y,i;

    scanf("%d",&n);

    for(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>

#include <cmath>



int main(int argc, char** argv)

{

    int prev_time = 0;

    int prev_x = 0;

    int prev_y = 0;

    int n = 0;

    bool is_success = true;



    std::cin >> n;



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

    {

        int cur_time, cur_x, cur_y = 0;



        std::cin >> cur_time >> cur_x >> cur_y;



        int diff_time = cur_time - prev_time;

        int diff_x = std::abs(cur_x - prev_x);

        int diff_y = std::abs(cur_y - prev_y);



        if ((diff_time % 2 != (diff_x + diff_y) % 2) ||

            (diff_time < diff_x + diff_y))

        {

            is_success = false;

        }



        cur_time = prev_time;

        cur_x = prev_x;

        cur_y = prev_y;

    }



    std::string result = is_success ? "Yes" : "No";

    std::cout << result << std::endl;



}


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



int main()

{

    int n,t,x,y,i;

    scanf("%d",&n);

    for(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;

struct f{

       int a;

       int b;

       int c;

       };

f aa[100005];

int main(){

    int n;

    cin>>n;

    int m=0;

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

            cin>>aa[i].a>>aa[i].b>>aa[i].c;

    }

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

            int k=aa[i].b+aa[i].c;

            if(aa[i].a<k){

                          m=1;

                          break;

            }

            if((aa[i].a-k)%2==1){

                                 m=1;

                                 break;

            }

    }

    if(m==1){

             cout<<"No"<<endl;

             }

    else{

         cout<<"Yes"<<endl;

         }

         return 0;

}


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



int main()

{

    int n,t,x,y,i;

    scanf("%d",&n);

    for(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;

	cin>>n;

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

		int q,w,e;

		cin>>q>>w>>e;

		int zong=w+e;

		if((q-zong)%2==1||zong>q){

			cout<<"No"<<endl;

			return 0;

		}

	}

	cout<<"Yes"<<endl;

	return 0;

}

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



int main()

{

    int n,t,x,y,i;

    scanf("%d",&n);

    for(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=0;i<n;i++)

    {

        cin>>t>>x>>y;

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

        {

            cout<<"No\n";

            return 0;

        }

    }

    cout<<"Yes\n";

}




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



int main()

{

    int n,t,x,y,i;

    scanf("%d",&n);

    for(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>

#include <cmath>

using namespace std;

int ans=0;

int main(){

	int i,j,k,n;

	cin>>n;

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

		int t,x,y;

		cin>>t>>x>>y;

		if((x+y)%2==t%2&&t>=x+y)ans++; 

	}

	if(ans==n)cout<<"Yes"<<endl;

	else cout<<"No"<<endl;

	return 0;

}

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



int main()

{

    int n,t,x,y,i;

    scanf("%d",&n);

    for(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>

#include<cstdio>

using namespace std;

int n,t,x,y;

int main()

{

	scanf("%d",&n);

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

	{

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

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

		{

			printf("No\n");

			return 0;

		}

	}

	printf("Yes\n");

	return 0;

}

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



int main()

{

    int n,t,x,y,i;

    scanf("%d",&n);

    for(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>

#include<cstdio>



using namespace std;



int n,a,b,c;

int main()

{

    cin>>n;

	while(n--)

	{

		cin>>a>>b>>c;

		if(a<b+c || (a&1)!=(b+c&1))

		{

			puts("No");

			return 0;

		}

	}

	puts("Yes");

}

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



int main()

{

    int n,t,x,y,i;

    scanf("%d",&n);

    for(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=0;i<n;i++)

	{

        cin>>t>>x>>y;

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

		{

            cout<<"No\n";

            return 0;

        }

    }

    cout<<"Yes\n";

    return 0;

}

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



int main()

{

    int n,t,x,y,i;

    scanf("%d",&n);

    for(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=0;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,i;

    scanf("%d",&n);

    for(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 i,j,k,p,n,m,t=0;

	cin>>n;

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

		cin>>m>>k>>p;

		if(m<k+p) t=1;

		else{

			if((m-p-k)%2==1) t=1;

		}

	}

	if(t==0) cout<<"Yes"<<endl;

	else cout<<"No"<<endl;

}

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



int main()

{

    int n,t,x,y,i;

    scanf("%d",&n);

    for(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=0;i<n;i++)

    {

        cin>>t>>x>>y;

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

        {

            cout<<"No\n";

            return 0;

        }

    }

    cout<<"Yes\n";

    return 0;

}

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



int main()

{

    int n,t,x,y,i;

    scanf("%d",&n);

    for(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<cstdio>

#include<iostream>

int n,x,y,t;

using namespace std;

int main()

{

	scanf("%d",&n);

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

	{

		cin>>t>>x>>y;

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

		{

			cout<<"No";

            return 0;   

        }

    }

    cout<<"Yes";

    return 0;

}

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



int main()

{

    int n,t,x,y,i;

    scanf("%d",&n);

    for(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>

#include<cstdio>

#include<algorithm>

#include<cmath>

#include<string>

#include<cstring>



using namespace std;

int n,a,b,c;

int main()

{

	cin>>n;

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

	{

		cin>>a>>b>>c;

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

	}

	cout<<"Yes\n";

	

	return 0;

}

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



int main()

{

    int n,t,x,y,i;

    scanf("%d",&n);

    for(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>

#include<cstdio>

#include<algorithm>

#include<cmath>

#include<stack>

#include<map>

#include<vector>

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");

    return 0;

}

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



int main()

{

    int n,t,x,y,i;

    scanf("%d",&n);

    for(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;

}