# ABC086-C
read
while read t1 x1 y1 ; do
    (( dx = x1 - x2, dy = y1 - y2 ))
    (( d = (t1 - t2) - ${dx#-} - ${dy#-}, d < 0 || d % 2 )) && echo No && exit
    read t2 x2 y2 || break
    (( dx = x1 - x2, dy = y1 - y2 ))
    (( d = (t2 - t1) - ${dx#-} - ${dy#-}, d < 0 || d % 2 )) && echo No && exit
done < <(head -n 75000)
echo Yes
