# ABC086-C

read # N

while read t1 x1 y1; do
    (( delta = (t1 - t0) - (x1 > x0 ? x1 - x0 : x0 - x1) - (y1 > y0 ? y1 - y0 : y0 - y1),
       t0 = t1, x0 = x1, y0 = y1, delta < 0 || delta % 2 )) && echo No && exit
done

echo Yes
