import java.util.*;
public class Main{
 public static void main(String[] args){
   Scanner sc = new Scanner(System.in);
 
   int N = sc.nextInt();
   int[] t = new int[N];
   int[] x = new int[N];
   int[] y = new int[N];
   for(int i=0;i<N;i++)
   {
     t[i] = sc.nextInt();
     x[i] = sc.nextInt();
     y[i] = sc.nextInt();
   }

   int tmpd =0;
   int tmpt =0;
   int tmpx =0;
   int tmpy =0;
   boolean cant = false;
   for(int i=0;i<N;i++) 
   {
     tmpd = Math.abs(tmpx-x[i])+Math.abs(tmpy-y[i]);
     if(tmpd>t[i]-tmpt)
     {
       cant = true;
       break;
     }
     else if((t[i]-tmpt-tmpd)%2==1)
     {
       cant = true;
       break;
     }
     tmpt=t[i];
     tmpx=x[i];
     tmpy=y[i];
   }
   String ans = "Yes";
   if(cant) ans = "No";
   System.out.println(ans);
 }
} import java.util.*; util.* java public class Main{
 public static void main(String[] args){
   Scanner sc = new Scanner(System.in);
 
   int N = sc.nextInt();
   int[] t = new int[N];
   int[] x = new int[N];
   int[] y = new int[N];
   for(int i=0;i<N;i++)
   {
     t[i] = sc.nextInt();
     x[i] = sc.nextInt();
     y[i] = sc.nextInt();
   }

   int tmpd =0;
   int tmpt =0;
   int tmpx =0;
   int tmpy =0;
   boolean cant = false;
   for(int i=0;i<N;i++) 
   {
     tmpd = Math.abs(tmpx-x[i])+Math.abs(tmpy-y[i]);
     if(tmpd>t[i]-tmpt)
     {
       cant = true;
       break;
     }
     else if((t[i]-tmpt-tmpd)%2==1)
     {
       cant = true;
       break;
     }
     tmpt=t[i];
     tmpx=x[i];
     tmpy=y[i];
   }
   String ans = "Yes";
   if(cant) ans = "No";
   System.out.println(ans);
 }
} Main public static void main(String[] args){
   Scanner sc = new Scanner(System.in);
 
   int N = sc.nextInt();
   int[] t = new int[N];
   int[] x = new int[N];
   int[] y = new int[N];
   for(int i=0;i<N;i++)
   {
     t[i] = sc.nextInt();
     x[i] = sc.nextInt();
     y[i] = sc.nextInt();
   }

   int tmpd =0;
   int tmpt =0;
   int tmpx =0;
   int tmpy =0;
   boolean cant = false;
   for(int i=0;i<N;i++) 
   {
     tmpd = Math.abs(tmpx-x[i])+Math.abs(tmpy-y[i]);
     if(tmpd>t[i]-tmpt)
     {
       cant = true;
       break;
     }
     else if((t[i]-tmpt-tmpd)%2==1)
     {
       cant = true;
       break;
     }
     tmpt=t[i];
     tmpx=x[i];
     tmpy=y[i];
   }
   String ans = "Yes";
   if(cant) ans = "No";
   System.out.println(ans);
 } main {
   Scanner sc = new Scanner(System.in);
 
   int N = sc.nextInt();
   int[] t = new int[N];
   int[] x = new int[N];
   int[] y = new int[N];
   for(int i=0;i<N;i++)
   {
     t[i] = sc.nextInt();
     x[i] = sc.nextInt();
     y[i] = sc.nextInt();
   }

   int tmpd =0;
   int tmpt =0;
   int tmpx =0;
   int tmpy =0;
   boolean cant = false;
   for(int i=0;i<N;i++) 
   {
     tmpd = Math.abs(tmpx-x[i])+Math.abs(tmpy-y[i]);
     if(tmpd>t[i]-tmpt)
     {
       cant = true;
       break;
     }
     else if((t[i]-tmpt-tmpd)%2==1)
     {
       cant = true;
       break;
     }
     tmpt=t[i];
     tmpx=x[i];
     tmpy=y[i];
   }
   String ans = "Yes";
   if(cant) ans = "No";
   System.out.println(ans);
 } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc int[] t = new int[N]; t new int[N] N int[] x = new int[N]; x new int[N] N int[] y = new int[N]; y new int[N] N for(int i=0;i<N;i++)
   {
     t[i] = sc.nextInt();
     x[i] = sc.nextInt();
     y[i] = sc.nextInt();
   } int i=0; int i=0; i 0 i<N i N i++ i++ i {
     t[i] = sc.nextInt();
     x[i] = sc.nextInt();
     y[i] = sc.nextInt();
   } {
     t[i] = sc.nextInt();
     x[i] = sc.nextInt();
     y[i] = sc.nextInt();
   } t[i] = sc.nextInt() t[i] t i sc.nextInt() sc.nextInt sc x[i] = sc.nextInt() x[i] x i sc.nextInt() sc.nextInt sc y[i] = sc.nextInt() y[i] y i sc.nextInt() sc.nextInt sc int tmpd =0; tmpd 0 int tmpt =0; tmpt 0 int tmpx =0; tmpx 0 int tmpy =0; tmpy 0 boolean cant = false; cant false for(int i=0;i<N;i++) 
   {
     tmpd = Math.abs(tmpx-x[i])+Math.abs(tmpy-y[i]);
     if(tmpd>t[i]-tmpt)
     {
       cant = true;
       break;
     }
     else if((t[i]-tmpt-tmpd)%2==1)
     {
       cant = true;
       break;
     }
     tmpt=t[i];
     tmpx=x[i];
     tmpy=y[i];
   } int i=0; int i=0; i 0 i<N i N i++ i++ i {
     tmpd = Math.abs(tmpx-x[i])+Math.abs(tmpy-y[i]);
     if(tmpd>t[i]-tmpt)
     {
       cant = true;
       break;
     }
     else if((t[i]-tmpt-tmpd)%2==1)
     {
       cant = true;
       break;
     }
     tmpt=t[i];
     tmpx=x[i];
     tmpy=y[i];
   } {
     tmpd = Math.abs(tmpx-x[i])+Math.abs(tmpy-y[i]);
     if(tmpd>t[i]-tmpt)
     {
       cant = true;
       break;
     }
     else if((t[i]-tmpt-tmpd)%2==1)
     {
       cant = true;
       break;
     }
     tmpt=t[i];
     tmpx=x[i];
     tmpy=y[i];
   } tmpd = Math.abs(tmpx-x[i])+Math.abs(tmpy-y[i]) tmpd Math.abs(tmpx-x[i])+Math.abs(tmpy-y[i]) Math.abs(tmpx-x[i]) Math.abs Math tmpx-x[i] tmpx x[i] x i Math.abs(tmpy-y[i]) Math.abs Math tmpy-y[i] tmpy y[i] y i if(tmpd>t[i]-tmpt)
     {
       cant = true;
       break;
     }
     else if((t[i]-tmpt-tmpd)%2==1)
     {
       cant = true;
       break;
     } tmpd>t[i]-tmpt tmpd t[i]-tmpt t[i] t i tmpt {
       cant = true;
       break;
     } cant = true cant true break; if((t[i]-tmpt-tmpd)%2==1)
     {
       cant = true;
       break;
     } (t[i]-tmpt-tmpd)%2==1 (t[i]-tmpt-tmpd)%2 (t[i]-tmpt-tmpd) t[i]-tmpt-tmpd t[i] t i tmpt tmpd 2 1 {
       cant = true;
       break;
     } cant = true cant true break; tmpt=t[i] tmpt t[i] t i tmpx=x[i] tmpx x[i] x i tmpy=y[i] tmpy y[i] y i String ans = "Yes"; ans "Yes" if(cant) ans = "No"; cant ans = "No" ans "No" System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main{
 public static void main(String[] args){
   Scanner sc = new Scanner(System.in);
 
   int N = sc.nextInt();
   int[] t = new int[N];
   int[] x = new int[N];
   int[] y = new int[N];
   for(int i=0;i<N;i++)
   {
     t[i] = sc.nextInt();
     x[i] = sc.nextInt();
     y[i] = sc.nextInt();
   }

   int tmpd =0;
   int tmpt =0;
   int tmpx =0;
   int tmpy =0;
   boolean cant = false;
   for(int i=0;i<N;i++) 
   {
     tmpd = Math.abs(tmpx-x[i])+Math.abs(tmpy-y[i]);
     if(tmpd>t[i]-tmpt)
     {
       cant = true;
       break;
     }
     else if((t[i]-tmpt-tmpd)%2==1)
     {
       cant = true;
       break;
     }
     tmpt=t[i];
     tmpx=x[i];
     tmpy=y[i];
   }
   String ans = "Yes";
   if(cant) ans = "No";
   System.out.println(ans);
 }
} public class Main{
 public static void main(String[] args){
   Scanner sc = new Scanner(System.in);
 
   int N = sc.nextInt();
   int[] t = new int[N];
   int[] x = new int[N];
   int[] y = new int[N];
   for(int i=0;i<N;i++)
   {
     t[i] = sc.nextInt();
     x[i] = sc.nextInt();
     y[i] = sc.nextInt();
   }

   int tmpd =0;
   int tmpt =0;
   int tmpx =0;
   int tmpy =0;
   boolean cant = false;
   for(int i=0;i<N;i++) 
   {
     tmpd = Math.abs(tmpx-x[i])+Math.abs(tmpy-y[i]);
     if(tmpd>t[i]-tmpt)
     {
       cant = true;
       break;
     }
     else if((t[i]-tmpt-tmpd)%2==1)
     {
       cant = true;
       break;
     }
     tmpt=t[i];
     tmpx=x[i];
     tmpy=y[i];
   }
   String ans = "Yes";
   if(cant) ans = "No";
   System.out.println(ans);
 }
} Main
import java.util.*;
public class Main{
 public static void main(String[] args){
   Scanner sc = new Scanner(System.in);
 
   int N = sc.nextInt();
   int[] t = new int[N];
   int[] x = new int[N];
   int[] y = new int[N];
   for(int i=0;i<N;i++)
   {
     t[i] = sc.nextInt();
     x[i] = sc.nextInt();
     y[i] = sc.nextInt();
   }

   int tmpd =0;
   int tmpt =0;
   int tmpx =0;
   int tmpy =0;
   boolean cant = false;
   for(int i=0;i<N;i++) 
   {
     tmpd = Math.abs(tmpx-x[i])+Math.abs(tmpy-y[i]);
     if(tmpd>t[i]-tmpt)
     {
       cant = true;
       break;
     }
     else if((t[i]-tmpt-tmpd)%2==1)
     {
       cant = true;
       break;
     }
     tmpt=t[i];
     tmpx=x[i];
     tmpy=y[i];
   }
   String ans = "Yes";
   if(cant) ans = "No";
   System.out.println(ans);
 }
}