function Main(input) {
    input = input.split("\n");
    var line;
    var cl[0] = "0,0";
    var result;
    var t;
    var dx;
    var dy;
    for(var i= 1; i <= parseInt(input[0], 10) ; i++){
        line = input[i].split(" ");
        t = line[0];
        dx = line[1];
        dy = line[2];
        
        for(var k = 1; k <= parseInt( t , 10); k++){
            for(var j = 0; j <= cl.length; j++){
                var ax = cl[j].split(",")[0];
                var ay = cl[j].split(",")[1];
                delete cl[j];
                cl.push((parseInt(ax,10) + 1).toString() + "," + ay);
                cl.push((parseInt(ax,10) - 1).toString() + "," + ay);
                cl.push(ax + "," + (parseInt(ay,10) + 1).toString());
                cl.push(ax + "," + (parseInt(ay,10) - 1).toString());
            }
        }
        
        for(var l = 0; l <= cl.length; l++){
            var x = cl[l].split(",")[0];
            var y = cl[l].split(",")[1];
            if(x === dx && y === dy){
                result[i] = "Yes";
            }
        }
    }
    
    var final = "Yes";
    for(var m= 1; m <= parseInt( input[0], 10) ; m++){
        if(result[m] !== "Yes"){
            final = "NG"
        }
    }
    //出力
    console.log(final);
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));