import java.util.Scanner;

public class Main{

    public static void main(String[] args) {
        
        Scanner scan = new Scanner(System.in);

        int n = scan.nextInt();

        int x = 0, y = 0;
        int it = 0;
        boolean res = true;
        for(int i=0; i<n; i++){
            int t = scan.nextInt();
            int tx = scan.nextInt();
            int ty = scan.nextInt();
            if(!res) continue;
            for(int j=it; j<t; j++){
                if(Math.abs(tx-x) > Math.abs(ty-y)){
                    if((tx-x) > 0) x++;
                    else x--;
                }else{
                    if((ty-y) > 0) y++;
                    else y--;
                }
            }
            it = t;
            if(x == tx && y == ty) res = true;
            else res =false;
        }

        if(res){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }

        scan.close();
        
    }

} import java.util.Scanner; Scanner java.util public class Main{

    public static void main(String[] args) {
        
        Scanner scan = new Scanner(System.in);

        int n = scan.nextInt();

        int x = 0, y = 0;
        int it = 0;
        boolean res = true;
        for(int i=0; i<n; i++){
            int t = scan.nextInt();
            int tx = scan.nextInt();
            int ty = scan.nextInt();
            if(!res) continue;
            for(int j=it; j<t; j++){
                if(Math.abs(tx-x) > Math.abs(ty-y)){
                    if((tx-x) > 0) x++;
                    else x--;
                }else{
                    if((ty-y) > 0) y++;
                    else y--;
                }
            }
            it = t;
            if(x == tx && y == ty) res = true;
            else res =false;
        }

        if(res){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }

        scan.close();
        
    }

} Main public static void main(String[] args) {
        
        Scanner scan = new Scanner(System.in);

        int n = scan.nextInt();

        int x = 0, y = 0;
        int it = 0;
        boolean res = true;
        for(int i=0; i<n; i++){
            int t = scan.nextInt();
            int tx = scan.nextInt();
            int ty = scan.nextInt();
            if(!res) continue;
            for(int j=it; j<t; j++){
                if(Math.abs(tx-x) > Math.abs(ty-y)){
                    if((tx-x) > 0) x++;
                    else x--;
                }else{
                    if((ty-y) > 0) y++;
                    else y--;
                }
            }
            it = t;
            if(x == tx && y == ty) res = true;
            else res =false;
        }

        if(res){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }

        scan.close();
        
    } main {
        
        Scanner scan = new Scanner(System.in);

        int n = scan.nextInt();

        int x = 0, y = 0;
        int it = 0;
        boolean res = true;
        for(int i=0; i<n; i++){
            int t = scan.nextInt();
            int tx = scan.nextInt();
            int ty = scan.nextInt();
            if(!res) continue;
            for(int j=it; j<t; j++){
                if(Math.abs(tx-x) > Math.abs(ty-y)){
                    if((tx-x) > 0) x++;
                    else x--;
                }else{
                    if((ty-y) > 0) y++;
                    else y--;
                }
            }
            it = t;
            if(x == tx && y == ty) res = true;
            else res =false;
        }

        if(res){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }

        scan.close();
        
    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int n = scan.nextInt(); n scan.nextInt() scan.nextInt scan int x = 0 x 0 y = 0; y 0 int it = 0; it 0 boolean res = true; res true for(int i=0; i<n; i++){
            int t = scan.nextInt();
            int tx = scan.nextInt();
            int ty = scan.nextInt();
            if(!res) continue;
            for(int j=it; j<t; j++){
                if(Math.abs(tx-x) > Math.abs(ty-y)){
                    if((tx-x) > 0) x++;
                    else x--;
                }else{
                    if((ty-y) > 0) y++;
                    else y--;
                }
            }
            it = t;
            if(x == tx && y == ty) res = true;
            else res =false;
        } int i=0; int i=0; i 0 i<n i n i++ i++ i {
            int t = scan.nextInt();
            int tx = scan.nextInt();
            int ty = scan.nextInt();
            if(!res) continue;
            for(int j=it; j<t; j++){
                if(Math.abs(tx-x) > Math.abs(ty-y)){
                    if((tx-x) > 0) x++;
                    else x--;
                }else{
                    if((ty-y) > 0) y++;
                    else y--;
                }
            }
            it = t;
            if(x == tx && y == ty) res = true;
            else res =false;
        } {
            int t = scan.nextInt();
            int tx = scan.nextInt();
            int ty = scan.nextInt();
            if(!res) continue;
            for(int j=it; j<t; j++){
                if(Math.abs(tx-x) > Math.abs(ty-y)){
                    if((tx-x) > 0) x++;
                    else x--;
                }else{
                    if((ty-y) > 0) y++;
                    else y--;
                }
            }
            it = t;
            if(x == tx && y == ty) res = true;
            else res =false;
        } int t = scan.nextInt(); t scan.nextInt() scan.nextInt scan int tx = scan.nextInt(); tx scan.nextInt() scan.nextInt scan int ty = scan.nextInt(); ty scan.nextInt() scan.nextInt scan if(!res) continue; !res res continue; for(int j=it; j<t; j++){
                if(Math.abs(tx-x) > Math.abs(ty-y)){
                    if((tx-x) > 0) x++;
                    else x--;
                }else{
                    if((ty-y) > 0) y++;
                    else y--;
                }
            } int j=it; int j=it; j it j<t j t j++ j++ j {
                if(Math.abs(tx-x) > Math.abs(ty-y)){
                    if((tx-x) > 0) x++;
                    else x--;
                }else{
                    if((ty-y) > 0) y++;
                    else y--;
                }
            } {
                if(Math.abs(tx-x) > Math.abs(ty-y)){
                    if((tx-x) > 0) x++;
                    else x--;
                }else{
                    if((ty-y) > 0) y++;
                    else y--;
                }
            } if(Math.abs(tx-x) > Math.abs(ty-y)){
                    if((tx-x) > 0) x++;
                    else x--;
                }else{
                    if((ty-y) > 0) y++;
                    else y--;
                } Math.abs(tx-x) > Math.abs(ty-y) Math.abs(tx-x) Math.abs Math tx-x tx x Math.abs(ty-y) Math.abs Math ty-y ty y {
                    if((tx-x) > 0) x++;
                    else x--;
                } if((tx-x) > 0) x++;
                    else x--; (tx-x) > 0 (tx-x) tx x 0 x++ x x-- x {
                    if((ty-y) > 0) y++;
                    else y--;
                } if((ty-y) > 0) y++;
                    else y--; (ty-y) > 0 (ty-y) ty y 0 y++ y y-- y it = t it t if(x == tx && y == ty) res = true;
            else res =false; x == tx && y == ty x == tx x tx y == ty y ty res = true res true res =false res false if(res){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        } res {
            System.out.println("Yes");
        } System.out.println("Yes") System.out.println System.out System System.out "Yes" {
            System.out.println("No");
        } System.out.println("No") System.out.println System.out System System.out "No" scan.close() scan.close scan String[] args args public class Main{

    public static void main(String[] args) {
        
        Scanner scan = new Scanner(System.in);

        int n = scan.nextInt();

        int x = 0, y = 0;
        int it = 0;
        boolean res = true;
        for(int i=0; i<n; i++){
            int t = scan.nextInt();
            int tx = scan.nextInt();
            int ty = scan.nextInt();
            if(!res) continue;
            for(int j=it; j<t; j++){
                if(Math.abs(tx-x) > Math.abs(ty-y)){
                    if((tx-x) > 0) x++;
                    else x--;
                }else{
                    if((ty-y) > 0) y++;
                    else y--;
                }
            }
            it = t;
            if(x == tx && y == ty) res = true;
            else res =false;
        }

        if(res){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }

        scan.close();
        
    }

} public class Main{

    public static void main(String[] args) {
        
        Scanner scan = new Scanner(System.in);

        int n = scan.nextInt();

        int x = 0, y = 0;
        int it = 0;
        boolean res = true;
        for(int i=0; i<n; i++){
            int t = scan.nextInt();
            int tx = scan.nextInt();
            int ty = scan.nextInt();
            if(!res) continue;
            for(int j=it; j<t; j++){
                if(Math.abs(tx-x) > Math.abs(ty-y)){
                    if((tx-x) > 0) x++;
                    else x--;
                }else{
                    if((ty-y) > 0) y++;
                    else y--;
                }
            }
            it = t;
            if(x == tx && y == ty) res = true;
            else res =false;
        }

        if(res){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }

        scan.close();
        
    }

} Main
import java.util.Scanner;

public class Main{

    public static void main(String[] args) {
        
        Scanner scan = new Scanner(System.in);

        int n = scan.nextInt();

        int x = 0, y = 0;
        int it = 0;
        boolean res = true;
        for(int i=0; i<n; i++){
            int t = scan.nextInt();
            int tx = scan.nextInt();
            int ty = scan.nextInt();
            if(!res) continue;
            for(int j=it; j<t; j++){
                if(Math.abs(tx-x) > Math.abs(ty-y)){
                    if((tx-x) > 0) x++;
                    else x--;
                }else{
                    if((ty-y) > 0) y++;
                    else y--;
                }
            }
            it = t;
            if(x == tx && y == ty) res = true;
            else res =false;
        }

        if(res){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }

        scan.close();
        
    }

}