# ABC086-C
declare -i t1 x1 y1 t2 x2 y2 d
read
while read t1 x1 y1 ; do
    (( 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
    (( d = (t2 - t1) - (x1 >= x2 ? x1 - x2 : x2 - x1) - (y1 >= y2 ? y1 - y2 : y2 - y1),
       d < 0 || d % 2 )) && echo No && exit
done < <(head -n 80000)
echo Yes
