program sample
    implicit none
  
    integer(8) :: i,j,m,n,a,b,t,a0,b0,t0
    integer(8),allocatable :: x(:),y(:)
  
    read(*,*) n
    a0=0
    b0=0
    t0=0
    do i=1,n
        read(*,*)t,a,b
        m=abs(a-a0)+abs(b-b0)
        if (m>t-t0)then
            write(*,*)'No'
            stop
        elseif(mod(m,2)/=mod(t-t0,2))then
            write(*,*)'No'
            stop
        end if
        a0=a
        b0=b
        t0=t
    end do


  
    write(*,*) 'Yes'
  
    stop
end program sample
  

