declare -r PREPROCESS='
BEGIN {
    t = 0; x = 0; y = 0
}
{
    print ($1 - t) " " ($2 - x) " " ($3 - y)
    t = $1; x = $2; y = $3
}'

read # N
while read dt dx dy; do
    if (( d = dt - ${dx#-} - ${dy#-}, d < 0 || d % 2 )); then
        echo No
        exit
    fi
done < <(awk "${PREPROCESS}")

echo Yes
