function main(input) {
    input = input.split("\n");
    const N = input[0].split(" ");
    var arr = [];
    for (var i = 1; i <= N; i++) {
        arr.push(input[i].split(" "));
    }
    traveling(N, arr);
}

function traveling(N, txy) {
    for (var i = 0; i < N; i++) {
        const t = parseInt(txy[i][0]);
        const x = parseInt(txy[i][1]);
        const y = parseInt(txy[i][2]);
        if (((x + y) % 2 !== (t % 2)) || (x + y) > t) {
            console.log('NO');
            return;
        }
    }
    console.log('YES');
}

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