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]);

        if (t > xy) {
            var result = t % 4 + xy % 4;
            if (result == 0 || result == 4) {
                current = to;
                continue;
            } else {
                console.log("No");
                return
            }
        } else if (t == xy) {
            current = to;
            continue;
        } else {
            console.log("No");
            return
        }
    }
    console.log("Yes");
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));