read
t=0
x=0
y=0
while read nt nx ny;do
 dx=$[x<nx?nx-x:x-nx]
 dy=$[y<ny?ny-y:y-ny]
 if [ $[dx+dy] -gt $[nt-t] -o $[(dx+dy)%2] -ne $[(nt-t)%2] ];then
  echo No
  exit
 fi
 t=$nt
 x=$nx
 y=$ny
done
echo Yes