# ABC086-C

read N

for (( i = 0; i < N; i++ )); do
    read t1 x1 y1
    (( d = (t1 - t0) - (x1 > x0 ? x1 - x0 : x0 - x1) - (y1 > y0 ? y1 - y0 : y0 - y1),
       t0 = t1, x0 = x1, y0 = y1, d < 0 || d % 2 != 0 )) && echo No && exit
done

echo Yes
