N = int(input())
plan = [list(map(int, input().split())) for i in range(N)]
m = 0
for i in range(N-1):
    time = plan[i+1][0]-plan[i][0]
    dist = abs(plan[i+1][1]-plan[i][1])+abs(plan[i+1][2]-plan[i][2])
    if time == 0:
      m = 1
      break
    if dist>time:
      m = 1
      break
    if dist%2 != time%2:
      m = 1
      break
print('Yes' if m==0 else 'No')
