implicit none
integer:: n,i
integer,allocatable:: t(:),x(:),y(:),ta(:),xa(:),ya(:)
 
read(*,*) n
allocate(t(n))
allocate(x(n))
allocate(y(n))
allocate(ta(n))
allocate(xa(n))
allocate(ya(n))
do i=1,n
read(*,*) t(i),x(i),y(i)
end do
ta(1)=t(1)
xa(1)=x(1)
ya(1)=y(1)
do i=2,n
ta(i)=abs(t(i+1)-t(i))
xa(i)=abs(x(i+1)-x(i))
ya(i)=abs(y(i+1)-y(i))
end do
 
do i=1,n
if(ta(i)<xa(i)+ya(i).or.mod(ta(i),2)/=mod(xa(i)+ya(i),2)then
write(*,*) 'No'
goto 100
endif
end do
 
write(*,*) 'Yes'
 
100 end