AtCoDeer the deer is going on a trip in a two-dimensional plane. In his plan, he will depart from point (0, 0) at time 0, then for each i between 1 and N (inclusive), he will visit point (x_i,y_i) at time t_i.  If AtCoDeer is at point (x, y) at time t, he can be at one of the following points at time t+1: (x+1,y), (x-1,y), (x,y+1) and (x,y-1). Note that **he cannot stay at his place**. Determine whether he can carry out his plan.
import sys
input = sys.stdin.readline
n=int(input())
TXY=[[0,0,0]]+[list(map(int,input().split())) for _ in range(n)]

for i in range(1,n+1):
  dift=abs(TXY[i][0]-TXY[i-1][0])
  difx=abs(TXY[i][1]-TXY[i-1][1])
  dify=abs(TXY[i][2]-TXY[i-1][2])
  print(dift,difx,dify)
  if (dift-(difx-dify))%2!=0 or dift<(difx+dify):
    print('No')
    exit()
print('Yes')
import sys
input = sys.stdin.readline
n=int(input())
TXY=[[0,0,0]]+[list(map(int,input().split())) for _ in range(n)]

for i in range(1,n+1):
  dift=abs(TXY[i][0]-TXY[i-1][0])
  difx=abs(TXY[i][1]-TXY[i-1][1])
  dify=abs(TXY[i][2]-TXY[i-1][2])
  if (dift-(difx-dify))%2!=0 or dift<(difx+dify):
    print('No')
    exit()
print('Yes')