read n

(( n > 10000 )) && M=16384 || M=32768

while read t1 x1 y1; do
    (( RANDOM < M )) &&
    (( d = (t1-t2) - (x1>x2 ? x1-x2 : x2-x1) - (y1>y2 ? y1-y2 : y2-y1),
       d < 0 || d % 2 )) && echo No && exit
    read t2 x2 y2 || break
    (( RANDOM < M )) &&
    (( d = (t2-t1) - (x1>x2 ? x1-x2 : x2-x1) - (y1>y2 ? y1-y2 : y2-y1),
       d < 0 || d % 2 )) && echo No && exit
done
echo Yes