program test
implicit none
integer::N,i,dt,dd,check
integer,allocatable::x(:),y(:),t(:)
read(*,*)N
allocate(x(0:N),y(0:N),t(0:N))
x(0)=0
y(0)=0
t(0)=0
check=0
do i=1,N
	read(*,*)t(i),x(i),y(i)
	dd=abs(x(i)-x(i-1))+abs(y(i)-y(i-1))
    dt=abs(t(i)-t(i-1))
    if(mod(dd,2)==mod(dt,2) .and. dd<=dt)then
    	check=check
    else
    	check=check+1
        exit
    end if
end do
if(check==0)then
	print*,'Yes'
else 
	print*,'No'
end if
end program