stablegradients/pie-gem5-bysrc huggingface dataset:
// Original C++ solution (slower):
#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;

}

// Optimized solution to the same problem (faster):
#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;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;

}

// Optimized solution to the same problem (faster):
#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;

        }

        /*#include<bits/stdc++.h>

using namespace std;

int main()

{

    bool flag=true;

    int n,a,b,c,d=0,e=0;

    cin>>n;

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

    {

    	cin>>a>>b>>c;

    	if(b+c-d-e>a)

    	{

    		cout<<"No"<<endl;

    		return 0;

		}

    	else if((b+c-d-e)%2!=a%2)

    	{

    		cout<<"No"<<endl;

    		return 0;

		}

    	d=b;

    	e=c;

	}

	cout<<"Yes"<<endl;

	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;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;

}

// Optimized solution to the same problem (faster):
#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;

        }

        /*#include<bits/stdc++.h>

using namespace std;

int main()

{

    bool flag=true;

    int n,a,b,c,d=0,e=0;

    cin>>n;

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

    {

    	cin>>a>>b>>c;

    	if(b+c-d-e>a)

    	{

    		cout<<"No"<<endl;

    		return 0;

		}

    	else if((b+c-d-e)%2!=a%2)

    	{

    		cout<<"No"<<endl;

    		return 0;

		}

    	d=b;

    	e=c;

	}

	cout<<"Yes"<<endl;

	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;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;	

}

// Optimized solution to the same problem (faster):
#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;

        }

        /*#include<bits/stdc++.h>

using namespace std;

int main()

{

    bool flag=true;

    int n,a,b,c,d=0,e=0;

    cin>>n;

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

    {

    	cin>>a>>b>>c;

    	if(b+c-d-e>a)

    	{

    		cout<<"No"<<endl;

    		return 0;

		}

    	else if((b+c-d-e)%2!=a%2)

    	{

    		cout<<"No"<<endl;

    		return 0;

		}

    	d=b;

    	e=c;

	}

	cout<<"Yes"<<endl;

	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;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;

}

// Optimized solution to the same problem (faster):
#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;

        }

        /*#include<bits/stdc++.h>

using namespace std;

int main()

{

    bool flag=true;

    int n,a,b,c,d=0,e=0;

    cin>>n;

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

    {

    	cin>>a>>b>>c;

    	if(b+c-d-e>a)

    	{

    		cout<<"No"<<endl;

    		return 0;

		}

    	else if((b+c-d-e)%2!=a%2)

    	{

    		cout<<"No"<<endl;

    		return 0;

		}

    	d=b;

    	e=c;

	}

	cout<<"Yes"<<endl;

	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;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#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

}

// Optimized solution to the same problem (faster):
#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;

        }

        /*#include<bits/stdc++.h>

using namespace std;

int main()

{

    bool flag=true;

    int n,a,b,c,d=0,e=0;

    cin>>n;

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

    {

    	cin>>a>>b>>c;

    	if(b+c-d-e>a)

    	{

    		cout<<"No"<<endl;

    		return 0;

		}

    	else if((b+c-d-e)%2!=a%2)

    	{

    		cout<<"No"<<endl;

    		return 0;

		}

    	d=b;

    	e=c;

	}

	cout<<"Yes"<<endl;

	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;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;



}


// Optimized solution to the same problem (faster):
#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;

        }

        /*#include<bits/stdc++.h>

using namespace std;

int main()

{

    bool flag=true;

    int n,a,b,c,d=0,e=0;

    cin>>n;

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

    {

    	cin>>a>>b>>c;

    	if(b+c-d-e>a)

    	{

    		cout<<"No"<<endl;

    		return 0;

		}

    	else if((b+c-d-e)%2!=a%2)

    	{

    		cout<<"No"<<endl;

    		return 0;

		}

    	d=b;

    	e=c;

	}

	cout<<"Yes"<<endl;

	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;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;

}


// Optimized solution to the same problem (faster):
#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;

        }

        /*#include<bits/stdc++.h>

using namespace std;

int main()

{

    bool flag=true;

    int n,a,b,c,d=0,e=0;

    cin>>n;

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

    {

    	cin>>a>>b>>c;

    	if(b+c-d-e>a)

    	{

    		cout<<"No"<<endl;

    		return 0;

		}

    	else if((b+c-d-e)%2!=a%2)

    	{

    		cout<<"No"<<endl;

    		return 0;

		}

    	d=b;

    	e=c;

	}

	cout<<"Yes"<<endl;

	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;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;

}

// Optimized solution to the same problem (faster):
#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;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#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";

}




// Optimized solution to the same problem (faster):
#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;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;

}

// Optimized solution to the same problem (faster):
#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;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;

}

// Optimized solution to the same problem (faster):
#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;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#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");

}

// Optimized solution to the same problem (faster):
#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;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;

}

// Optimized solution to the same problem (faster):
#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;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;

}

// Optimized solution to the same problem (faster):
#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;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;

}

// Optimized solution to the same problem (faster):
#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;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;

}

// Optimized solution to the same problem (faster):
#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;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;

}

// Optimized solution to the same problem (faster):
#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;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;

}

// Optimized solution to the same problem (faster):
#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;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;

}

// Optimized solution to the same problem (faster):
#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;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<bits/stdc++.h>

using namespace std;

int main(){

    int N;

    for(cin>>N;N;--N){

        int t,x,y;

        cin>>t>>x>>y;

        if(t<x+y||(t-x-y)&1)return cout<<"No",0;

    }

    return cout<<"Yes",0;

}

// Optimized solution to the same problem (faster):
#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;

}

// Fastest known solution for this problem: