#!/bin/bash

read N
T=0
X=0
Y=0

distance() {
    echo $((
    ($1 < $3 ? $3-$1 : $1-$3)
    +
    ($2 < $4 ? $4-$2 : $2-$4)
    ))
}

for _ in $(seq $N); do
    read t x y
    dist=$( distance $X $Y $x $y )
    dt=$(( t - T ))

    if (( $(( dist > dt || (dt - dist) % 2 == 1 )) )); then
        echo No
        exit
    fi

    T=$t
    X=$x
    Y=$y
done
echo Yes
