implicit none
integer:: n,i
integer,allocatable,dimension(:):: t,x,y,x_a,y_a,t_a

read(5,*) n

allocate(t(n))
allocate(x(n))
allocate(y(n))
allocate(x_a(n))
allocate(y_a(n))
allocate(t_a(n))

do i=1,n
    read(5,*) t(i), x(i), y(i)
enddo

x_a(1)=x(1)
y_a(1)=y(1) 
t_a(1)=t(1) 

do i=2,n
    x_a(i)=abs(x(i)-x(i-1))
    y_a(i)=abs(y(i)-y(i-1))    
    t_a(i)=abs(t(i)-t(i-1))     
enddo

do i=1,n
    if (mod(t_a(i),2)/=mod(x_a(i)+y_a(i),2) .or. t_a(i)<x_a(i)+y_a(i)) then
        write(6,*) "No"
        goto 100
    endif
enddo

write(6,*) "Yes"

100 end
