function Main(input) {
    input = input.split(/\n/)
    var current = [0, 0, 0];
    input = input.slice(1);
    for (a in input) {
        var to = input[a].split(/\s/).map(val => parseInt(val));
        var t = to[0] - current[0];
        var xy = Math.abs(current[1] - to[1]) + Math.abs(current[2] - to[2]);
        var A = t - xy;
        if (AA % 4 == 0 || A % 4 == 4) {
            current = to;
            continue;

        } else {
            console.log("No");
            return
        }
    }
    console.log("Yes");
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));