CodeEff/ECCO huggingface dataset:
# Original solution
T = 0
X = 1
Y = 2
item = eval(input())
tabiji = [[0,0,0]]
for i in range(1, int(item)+1):
    tabiji.append(input().split(' '))

a = 'Yes'
for i in range(0, len(tabiji)-1):
    time = int(tabiji[i+1][T]) - int(tabiji[i][T])
    dX = int(tabiji[i+1][X]) - int(tabiji[i][X])
    dY = int(tabiji[i+1][Y]) - int(tabiji[i][Y])
    for j in range(time):
        if dX > 0:
            dX -= 1
        elif dX < 0:
            dX += 1
        elif dY > 0:
            dY -= 1
        elif dY < 0:
            dY += 1
        if dX == 0 and dY == 0 and (time - j+1) % 2 == 1:
            a = 'No'
            break
        elif dX == 0 and dY == 0 and (time - j+1) % 2 == 0:
            break
    if dX != 0 or dY != 0:
        a = 'No'

print(a)

# Optimized solution
T = 0
X = 1
Y = 2
item = eval(input())
tabiji = [[0,0,0]]
for i in range(1, int(item)+1):
    tabiji.append(input().split(' '))

a = 'Yes'
for i in range(0, len(tabiji)-1):
    time = int(tabiji[i+1][T]) - int(tabiji[i][T])
    dX = abs(int(tabiji[i+1][X]) - int(tabiji[i][X]))
    dY = abs(int(tabiji[i+1][Y]) - int(tabiji[i][Y]))
    dtime = time - dX - dY
    if dtime < 0 or dtime % 2 == 1:
        a = 'No'

print(a)
# Original solution
n = int(eval(input()))
pret = 0
prex = 0
prey = 0
flag = True
for i in range(n):
    t,x,y = list(map(int,input().split()))
    if flag:
        tmp = t - pret - abs(x - prex) - abs(y - prey)
        #print(t, x, y, tmp)
        if tmp >= 0 and tmp % 2 == 0:
            pret = t
            prex = x
            prey = y
        else:
            flag = False
if flag:
    print('Yes')
else:
    print('No')


# Optimized solution
import sys
n = int(eval(input()))
pret = 0
prex = 0
prey = 0
for i in range(n):
    t,x,y = list(map(int,input().split()))
    tmp = t - pret - abs(x - prex) - abs(y - prey)
    #print(t, x, y, tmp)
    if tmp >= 0 and tmp % 2 == 0:
        pret = t
        prex = x
        prey = y
    else:
        print('No')
        sys.exit()
print('Yes')
# Original solution
#! env python
# -*- coding: utf-8 -*-

import os
import sys

# at_coder.ABC086C_Traveling
# Date: 2019/06/02
# Filename: ABC086C_Traveling 

__author__ = 'acto_mini'
__date__ = "2019/06/02"


def main():
    # 作業ディレクトリを自身のファイルのディレクトリに変更
    os.chdir(os.path.dirname(os.path.abspath(sys.argv[0])))

    t, x, y = [0], [0], [0]

    # 整数の入力
    num = int(eval(input()))

    for i in range(num):
        a, b, c = list(map(int, input().split()))
        t.append(a)
        x.append(b)
        y.append(c)

    can = True
    for i in range(num):
        dt = t[i + 1] - t[i]
        dist = abs(x[i + 1] - x[i]) + abs(y[i + 1] - y[i])
        if (dt < dist):
            can = False
        if (dt % 2 != dist % 2):
            can = False

    if can:
        print("Yes")
    else:
        print("No")

    return


if __name__ == '__main__':
    main()


# Optimized solution
#! env python
# -*- coding: utf-8 -*-

import os
import sys

# ac_py.main.py
# Date: 2020/06/08
# Filename: main.py 

__author__ = 'acto_mini'
__date__ = "2020/06/08"


def main():
    n = int(eval(input()))
    t_prev = 0
    x_prev = 0
    y_prev = 0
    for i in range(n):
        t, x, y = list(map(int, input().split()))
        dt = t - t_prev
        dist = abs(x - x_prev) + abs(y - y_prev)
        if dt < dist or ((dt % 2) != (dist % 2)):
            print("No")
            exit()
        t_prev, x_prev, y_prev = t, x, y

    print("Yes")
    return


if __name__ == '__main__':
    main()
# Original solution
import copy

N = int(eval(input()))
txy = {}
for i in range(N):
    t, x, y = list(map(int, input().split(' ')))
    txy[t] = [x, y]

src_t = 0
src_x = 0
src_y = 0

success = True

for t, xy in list(txy.items()):
    dest_t = t
    dest_x = xy[0]
    dest_y = xy[1]

    before = [[src_x, src_y]]
    after = []
    for i in range(src_t, dest_t):
        after.clear()
        for before_x, before_y in before:
            after.append([before_x + 1, before_y])
            after.append([before_x - 1, before_y])
            after.append([before_x, before_y + 1])
            after.append([before_x, before_y - 1])
        before = copy.deepcopy(after)

    if [dest_x, dest_y] in after:
        src_t = dest_t
        src_x = dest_x
        src_y = dest_y
        continue
    else:
        success = False
        break

if success:
    print('Yes')
else:
    print('No')


# Optimized solution
n = int(eval(input()))

src_t = 0
src_x = 0
src_y = 0
success = True

for i in range(n):
    t, x, y = list(map(int, input().split(' ')))
    if success == True:
        dt = t - src_t
        dist = abs(x - src_x) + abs(y - src_y)
        if dist <= dt and dist % 2 == dt % 2:
            src_t = t
            src_x = x
            src_y = y
            continue
        else:
            success = False

if success:
    print('Yes')
else:
    print('No')
# Original solution
n = int(eval(input()))
prev_dst = 0
prev_time = 0
for _ in range(n):
    t, x, y = list(map(int, input().split()))
    if t % 2 == 0 and (x + y) % 2 != 0:
        print('No')
        exit()
    if t % 2 == 1 and (x + y) % 2 != 1:
        print('No')
        exit()
    if (t - prev_time) < abs(x + y - prev_dst):
        print('No')
        exit()
    prev_time = t
    prev_dst = x + y
print('Yes')

# Optimized solution
n = int(eval(input()))
prev_dst = 0
prev_time = 0
for _ in range(n):
    t, x, y = list(map(int, input().split()))
    total = x + y
    if t % 2 != total % 2 or (t - prev_time) < abs(total - prev_dst):
        print('No')
        exit()
    prev_time = t
    prev_dst = total
print('Yes')
# Original solution
N = int(eval(input()))
T = [0]*100000
X= [0]*100000
Y= [0]*100000
x = 0
y = 0

for n in range(N):
        T[n],X[n],Y[n] = (list(map(int, input().split())))

flag = 1
for n in range(N):
    #print(n)
    if flag == 0:
        continue


    if n == 0:
        count = T[n]
    else:
        count = T[n] - T[n-1]
        x = X[n-1]
        y = Y[n-1]
    c = 0
    end = 0
    while True:
        if end == 1:
            break
        s_x = X[n] - x
        s_y = Y[n] - y
    #    print(str(s_x)+' '+str(s_y))

        if ((s_x != 0 or s_y !=0) )and (c!=count):
            if s_x >0:
                x +=1
                c += 1
            elif s_x < 0:
                x -= 1
                c+=1
            elif s_y > 0:
                y +=1
                c += 1
            elif s_y < 0:
                y -= 1
                c+=1
        elif  ((s_x == 0 and s_y == 0) )and (c!=count):
                x +=1
                c +=1
        elif c==count:
            if (x == X[n] and y ==Y[n]):
                flag = 1
                end=1
            else:
                flag=0
                end =1



if flag == 1:
    print('Yes')
else:
    print('No')


# Optimized solution
N  = int(eval(input()))
t = [0]*110000
x= [0]*110000
y= [0]*110000

for n in range(N):
        t[n+1],x[n+1],y[n+1] = (list(map(int, input().split())))

can = True

for i in range(N):
    dt = t[i+1] - t[i]
    dist = abs(x[i+1] - x[i]) + abs(y[i+1] - y[i])

    if dt < dist: #dt が大きければたどり着ける
        can = False
    if (dist % 2 != dt % 2):#動いていなければ偶数奇数がずれる
        can = False

if can == True:
    print('Yes')
else:
    print('No')
# Original solution
N = int(eval(input()))
txy = [[0, 0, 0]] + [list(map(int, input().split())) for _ in range(N)]
flag = True
for i in range(N):
    nt = txy[i+1][0]
    nx = txy[i+1][1]
    ny = txy[i+1][2]
    t = txy[i][0]
    x = txy[i][1]
    y = txy[i][2]
    move = nt - t
    tmp = abs(nx-x)+abs(ny-y)
    if move >= tmp:
        if abs(move-tmp) % 2 != 0:
            flag = False
            break
    else:
        flag = False
        break
print(('Yes' if flag else 'No'))


# Optimized solution
N = int(eval(input()))
txy = [[0, 0, 0]] + [list(map(int, input().split())) for _ in range(N)]
flag = True
for i in range(N):
    nt = txy[i+1][0]
    nx = txy[i+1][1]
    ny = txy[i+1][2]
    t = txy[i][0]
    x = txy[i][1]
    y = txy[i][2]
    move = nt - t
    tmp = abs(nx-x)+abs(ny-y)
    if move >= tmp:
        if abs(move-tmp) % 2 != 0:
            print('No')
            exit()
    else:
        print('No')
        exit()
print('Yes')
# Original solution
N=eval(input())
a=[]
t=True
for _ in range(int(N)):
    a+=[list(map(int,input().split()))]
for i in range(int(N)):
    if a[i][0]%2==0:
        if abs(a[i][1]+a[i][2])<=a[i][0] and (a[i][1]+a[i][2])%2==0:
            continue
        else:
            print('No')
            t=False
            break
    else:
        if abs(a[i][1]+a[i][2]<=a[i][0]) and (a[i][1]+a[i][2])%2==1:
            continue
        else:
            print('No')
            t=False
            break
if t:
    print('Yes')

# Optimized solution
import sys
n=int(eval(input()))
t=[]
for i in range(n):
    t.append(list(map(int,input().split())))
for i,d in enumerate(t):
    if i>0:
        b=d[0]-a
        c=abs(d[1]+d[2]-aa)
    a=d[0]
    aa=d[1]+d[2]
    if i==0:
        if not (a >= aa and a % 2 == aa % 2):
            print('No')
            sys.exit()
        else:
            continue
    if not (b>=c and b%2==c%2):
        print('No')
        sys.exit()
print('Yes')
# Original solution
def travel(x,y,t):
    for i in range(t):
        if x+y==t-2*i:
            return True
    return False
n=int(eval(input()))
for i in range(n):
    t, x, y = [int(j) for j in input().split() ]
    if not travel(x,y,t):
        print("No")
        exit()
print("Yes")    


# Optimized solution
n=int(eval(input()))
txy=[[0, 0, 0]]+[list(map(int, input().split())) for i in range(n)]
def C(txy0, txy1):
    xx=txy1[1]-txy0[1]
    yy=txy1[2]-txy0[2]
    tt=txy1[0]-txy0[0]
    if xx+yy<=tt and (xx+yy-tt)%2==0:
        return True
    return False
if all(C(txy[i], txy[i+1]) for i in range(n)):
    print('Yes')
else:
    print('No')
# Original solution
def main():
    import sys
    input = sys.stdin.buffer.readline
    N = int(input())
    TXY = [[int(i) for i in input().split()] for j in range(N)]
    time, px, py = 0, 0, 0
    for t, x, y in TXY:
        move = abs(x-px) + abs(y-py)
        # print(move, t-time)
        if (t - time) % 2 != move % 2 or t - time < move:
            return print("No")
        time, px, py = t, x, y
    print("Yes")


if __name__ == '__main__':
    main()


# Optimized solution
def main():
    import sys
    input = sys.stdin.buffer.readline
    N = int(input())
    TXY = [[int(i) for i in input().split()] for j in range(N)]
    time = 0
    px = 0
    py = 0
    for t, x, y in TXY:
        move = abs(py-y) + abs(px - x)
        if (t-time) < move or (t - time) % 2 != move % 2:
            return print("No")
        time = t
        px = x
        py = y
    print("Yes")


if __name__ == '__main__':
    main()
# Original solution
import sys
n = int(input())
data = [list(map(int, input().split())) for i in range(n)]
t = 0
x = 0
y = 0
for d in data:
  duration = d[0] - t
  distance = abs(x - d[1]) + abs(y - d[2])
  if (distance > duration) or ((duration - distance) % 2 == 1):
    print('No')
    sys.exit()
  t = d[0]
  x = d[1]
  y = d[2]
print('Yes')

# Optimized solution
import sys
def main():
  _int = int
  _abs = abs
  n = int(eval(input()))
  data = [[_int(e) for e in input().split()] for _ in range(n)]
  t, x, y = 0, 0, 0
  for d in data:
    rt = d[0] - t - _abs(x - d[1]) - _abs(y - d[2])
    if rt < 0 or rt & 1 == 1:
      print('No')
      sys.exit()
    t, x, y = d
  print('Yes')
main()
# Original solution
import sys
def main():
  _int = int
  n = int(eval(input()))
  data = [[_int(e) for e in input().split()] for _ in range(n)]
  t, x, y = 0, 0, 0
  for d in data:
    rt = d[0] - t - abs(x - d[1]) - abs(y - d[2])
    if rt < 0 or rt & 1 == 1:
      print('No')
      sys.exit()
    t, x, y = d
  print('Yes')
main()


# Optimized solution
from sys import exit
n = int(eval(input()))
data = [list(map(int, input().split())) for _ in range(n)]
t = 0
x = 0
y = 0
for d in data:
  duration = d[0] - t
  distance = abs(x - d[1]) + abs(y - d[2])
  if (distance > duration) or ((duration - distance) % 2 == 1):
    print('No')
    exit()
  t = d[0]
  x = d[1]
  y = d[2]
print('Yes')
# Original solution
n = int(eval(input()))
bt, bx, by = 0, 0, 0
ans = 'Yes'
for i in range(n):
    t, x, y = list(map(int, input().split()))
    if ((t % 2 == 0 and (x + y) % 2 == 0) or (t % 2 == 1 and (x + y) % 2 == 1)) and (abs(x - bx) + abs(y - by) <= t - bt):
        bt, bx, by = t, x, y
        continue
    else:
        ans = 'No'
        break
print(ans)


# Optimized solution
n = int(eval(input()))
ans = "Yes"
for _ in range(n):
    t, x, y = list(map(int, input().split()))
    if (t < x + y) or (t + x + y) % 2 == 1:
        ans = "No"
print(ans)
# Original solution
N = int(eval(input()))
tt = 0
xx = 0
yy = 0
flag = True
z = [list(map(int, input().split())) for _ in range(N)]
for i in range(N):
    t, x, y = z[i]
    s = [[xx, yy]]
    for j in range(t - tt):
        ss = []
        for k in range(len(s)):
            ss.append([s[k][0] + 1, s[k][1]])
            ss.append([s[k][0] - 1, s[k][1]])
            ss.append([s[k][0], s[k][1] + 1])
            ss.append([s[k][0], s[k][1] - 1])
        s = ss
    if [x, y] in s:
        tt = t
        xx = x
        yy = y
    else:
        print('No')
        exit()
print('Yes')

# Optimized solution
N = int(eval(input()))
tt = 0
xx = 0
yy = 0
z = [list(map(int, input().split())) for _ in range(N)]
for i in range(N):
    t, x, y = z[i]
    dt = t - tt
    dx = abs(x - xx)
    dy = abs(y - yy)
    if dt < dx + dy or (dt - (dx + dy)) % 2:
        print('No')
        exit()
    tt = t
    xx = x
    yy = y
print('Yes')
# Original solution
n=int(eval(input()))
l=[list(map(int,input().split())) for i in range(n)]
t=0
x=0
y=0
flag=True
for i in range(n):
    tt=l[i][0]-t
    d=abs(l[i][1]-x)+abs(l[i][2]-y)
    if tt<d or tt%2!=d%2:
        flag=False
    t=l[i][0]
    x=l[i][1]
    y=l[i][2]
if flag:
    print("Yes")
else:
    print("No")


# Optimized solution
n=int(eval(input()))
X=0
Y=0
T=0
f=1
for _ in range(n):
    t,x,y=list(map(int,input().split()))
    dx=abs(x-X)
    dy=abs(y-Y)
    dt=t-T
    if dt>=dx+dy and dt%2==(dx+dy)%2:
        pass
    else:
        f=0
print(("Yes" if f else "No"))
# Original solution
#!/bin/env python3

N = int(eval(input()))

t_prev = x_prev = y_prev = 0
for i in range(N):
    t_i, x_i, y_i = list(map(int, input().split()))

    if (x_i+y_i)> t_i:
        print("No")
        exit()
    elif (x_i+y_i) %2 != t_i%2 :
        print("No")
        exit()
    elif (abs(x_i - x_prev) + abs(y_i - y_prev)) > (t_i - t_prev):
        print("No")
        exit()

print("Yes")


# Optimized solution
#!/bin/env python3

N = int(eval(input()))

#t_prev = x_prev = y_prev = 0
for i in range(N):
    t_i, x_i, y_i = list(map(int, input().split()))

    if (x_i+y_i)> t_i:
        print("No")
        exit()
    elif (x_i+y_i) %2 != t_i%2 :
        print("No")
        exit()
    #elif (abs(x_i - x_prev) + abs(y_i - y_prev)) > (t_i - t_prev):
    #    print("No")
    #    exit()

print("Yes")
# Original solution
n = int(eval(input()))
t = [0]
x = [0]
y = [0]
for i in range(n):
    t_tmp, x_tmp, y_tmp = list(map(int, input().split()))
    t.append(t_tmp)
    x.append(x_tmp)
    y.append(y_tmp)

r_init = [0, 0]
parity = 0 # 偶数
for i in range(1, n+1):
    dt = t[i] - t[i-1]
    dx = abs(x[i] - x[i-1])
    dy = abs(y[i] - y[i-1])
    dist = dx + dy

    if dist > dt:
        print('No')
        exit()
    
    if dt % 2 != dist % 2:
        print('No')
        exit()

print('Yes')

# Optimized solution
n = int(eval(input()))

prev_t = 0
prev_x = 0
prev_y = 0

for i in range(n):
    t, x, y = list(map(int, input().split()))

    dt = t - prev_t
    dx = abs(x - prev_x)
    dy = abs(y - prev_y)
    dist = dx + dy

    if dist > dt:
        print('No')
        exit()
    
    if dt % 2 != dist % 2:
        print('No')
        exit()

print('Yes')
# Original solution
N = int(eval(input()))
txy = [[0, 0, 0]] + [list(map(int, input().split())) for _ in range(N)]
result = True

for i in range(N):
    dt = txy[i + 1][0] - txy[i][0]
    dist = abs(txy[i + 1][1] - txy[i][1]) + abs(txy[i + 1][2] - txy[i][2])
    
    if(dist > dt): result = False
    if(dist % 2 != dt % 2): result = False

print((("No", "Yes")[result]))

# Optimized solution
N = int(eval(input()))
txy = [list(map(int, input().split())) for _ in range(N)]
result = True

for pol in txy:
    dist = abs(pol[1]) + abs(pol[2])
    
    if(dist > pol[0]): result = False
    if(dist % 2 != pol[0] % 2): result = False

print((("No", "Yes")[result]))
# Original solution
def solve(T_X_Y):
    curr_t = 0
    curr_x = 0
    curr_y = 0
    for t_x_y in T_X_Y:
        t = t_x_y[0]
        x = t_x_y[1]
        y = t_x_y[2]
        if not travelable(curr_t, curr_x, curr_y, t, x, y):
            return "No"
    return "Yes"


def travelable(curr_t, curr_x, curr_y, t, x, y):
    dist_x = abs(x - curr_x)
    dist_y = abs(y - curr_y)
    min_step = dist_x + dist_y
    if t - curr_t < min_step:
        return False
    return (t - curr_t - min_step) % 2 == 0


N = int(eval(input()))
T_X_Y = [list(map(int, input().split())) for _ in range(N)]

print((solve(T_X_Y)))

# Optimized solution
# 0位置からの計算でも途中位置からの計算でも計算コストは同じ
def travelable(t, x, y):
    min_step = x + y
    if t < min_step:
        return False
    return (t - min_step) % 2 == 0

ans = None
N = int(eval(input()))
for _ in range(N):
    t_x_y = list(map(int, input().split()))
    if not travelable(t_x_y[0], t_x_y[1], t_x_y[2]):
        ans = "No"
        break
if ans is None:
    ans = "Yes"
print(ans)
# Original solution
n = int(eval(input()))
cnt = 0
t,x,y = 0,0,0
for i in range(n):
  nt, nx, ny  = list(map(int, input().split()))
  if abs(nx-x)+abs(ny-y) <= nt-t and t%2 == (x+y)%2:
    cnt += 1
  t,x,y = nt,nx,ny
print(("Yes" if cnt == n else "No"))

# Optimized solution
n = int(eval(input()))
t,x,y = 0,0,0
for i in range(n):
  nt, nx, ny  = list(map(int, input().split()))
  if not(abs(nx-x)+abs(ny-y) <= nt-t and t%2 == (x+y)%2):
    print("No")
    exit()
  t,x,y = nt,nx,ny
print("Yes")
# Original solution
N = int(eval(input()))
ans = "Yes"
i = 0
while i < N:
    t,x,y = [int(num) for num in input().split()]
    if x+y <= t and (t-x-y)%2 == 0:
        i += 1
    else:
        ans = "No"
        break
print(ans)

# Optimized solution
n = int(eval(input()))
for i in range(n):
    t,x,y = list(map(int,input().split()))
    if (x+y) > t or (x+y+t) % 2:
        print("No")
        quit()
print("Yes")
# Original solution
if __name__ == "__main__":
    n = int(eval(input()))
    plan = list()
    for i in range(n):
        plan.append(list(map(int, input().split())))

    pos = [0, 0]
    time = 0
    for i in range(n):
        delta_t = plan[i][0] - time
        delta_x = plan[i][1] - pos[0]
        delta_y = plan[i][2] - pos[1]
        if delta_t < delta_x + delta_y:
            print('No')
            exit()
        elif (delta_t - delta_x - delta_y) % 2 == 1:
            print('No')
            exit()
        pos[0] = plan[i][1]
        pos[1] = plan[i][2]
        time = plan[i][0]

    print('Yes')


# Optimized solution
if __name__ == "__main__":
    n = int(eval(input()))
    pos = [0, 0]
    time = 0
    flag = False

    for i in range(n):
        tmp = list(map(int, input().split()))
        time = tmp[0] - time
        dist = tmp[1] - pos[0] + tmp[2] - pos[1]
        if time < dist or (dist - time) % 2 == 1:
            flag = True
        pos = [tmp[1], tmp[2]]
        time = tmp[0]

    if flag:
        print('No')
    else:
        print('Yes')
# Original solution
def main():
    N = int(input().strip())
    stx = sty = stt = 0
    for i in range(N):
        t, x, y = [int(x) for x in input().strip().split()]
        mvt = abs(stt - t)
        mvx = abs(stx - x)
        mvy = abs(sty - y)
        
        mvxy = mvx + mvy
        
        if mvt < (mvx + mvy):
            return "No"
        if (mvt % 2) != (mvxy % 2):
            return "No"
        stx = x
        sty = y
        stt = t
    return "Yes"
        
if __name__ == '__main__':
    print((main()))

# Optimized solution
def main():
    N = int(input().strip())
    stx = sty = stt = 0
    for i in range(N):
        t, x, y = [int(x) for x in input().strip().split()]
        mvt = abs(stt - t)
        mvx = abs(stx - x)
        mvy = abs(sty - y)
        
        mvxy = mvx + mvy
        
        if mvt < mvxy:
            return "No"
        if mvt % 2 != mvxy % 2:
            return "No"
        # 次のスタート地点
        stx = x
        sty = y
        stt = t
    return "Yes"
        
if __name__ == '__main__':
    print((main()))
# Original solution
n = int(eval(input()))
x = [0]
y = [0]
t = [0]
fl = True
def judge(a,b,c,d,e,f):
    if abs(b-a)+abs(d-c) <= f-e and abs(b+d-a-c)%2 == abs(f-e)%2:
        return False
    return True
for i in range(n):
    tt,xx,yy = list(map(int,input().split()))
    x.append(xx)
    y.append(yy)
    t.append(tt)
    if judge(x[i],x[i+1],y[i],y[i+1],t[i],t[i+1]):
        fl = False
if(fl):
    print("Yes")
else:
    print("No")


# Optimized solution
n = int(eval(input()))
x = 0
y = 0
t = 0
a = 0
def trav(a,b,c,d,e,f):
    if abs(a-b) + abs(c-d) <= e - f and ((a-b) % 2 + (c-d) % 2)%2 == (e-f) % 2:
        return 0
    else:
        return 1
for i in range(n):
    tn,xn,yn = list(map(int,input().split()))
    if trav(xn,x,yn,y,tn,t) == 0:
        x = xn
        y = yn
        t = tn
    else:
        a = 1
if a == 0:
    print("Yes")
else:
    print("No")
# Original solution
import sys

read = sys.stdin.buffer.read
input = sys.stdin.buffer.readline
inputs = sys.stdin.buffer.readlines

# rstrip().decode('utf-8')
# map(int,input().split())
# import numpy as np


def main():
	n=int(eval(input()))
	li=[[0,0,0]]+[list(map(int,input().split())) for _ in range(n)]
	
	ans="Yes"
	
	li2=[]
	for i in range(n):
		li2.append([li[i+1][0]-li[i][0],abs(li[i+1][1]-li[i][1])+abs(li[i+1][2]-li[i][2])])
	
	for t,k in li2:
		if t%2!=k%2 or t<k:
			ans="No"
	
	print(ans)
	
	
if __name__ == "__main__":
	main()


# Optimized solution
import sys
#input = sys.stdin.readline
input = sys.stdin.buffer.readline

# mod=10**9+7
# rstrip().decode('utf-8')
# map(int,input().split())
# import numpy as np


def main():
	n=int(eval(input()))
	li=[[0,0,0]]+[list(map(int,input().split())) for _ in range(n)]
	td=[]
	for i in range(n):
		td.append((li[i+1][0]-li[i][0],abs(li[i+1][1]-li[i][1])+abs(li[i+1][2]-li[i][2])))

	ans="Yes"

	for t,d in td:
		if t<d or t%2!=d%2:
			ans="No"

	print(ans)
















if __name__ == "__main__":
	main()
# Original solution
#086 C Traveling
N =int(eval(input()))

List=[list(map(int,input().split())) for i in range(N)]
for i,l in enumerate(List):
    dt =List[i][0] - List[i-1][0]
    distance = abs(List[i][1] - List[i-1][1])+abs(List[i][2] - List[i-1][2])
        
    if i==0 and l[0] ==abs(l[1])+abs(l[2]):
        continue
    elif i==0 and l[0] !=abs(l[1])+abs(l[2]):
        print('No')
        exit()
    elif i!=0 and dt%2==distance%2 and distance<=dt:
        continue
    else:
        print('No')
        exit()
print('Yes')

# Optimized solution
# C - Traveling
N = int(eval(input()))
T = []
for n in range(N):
    T.append([int(i) for i in input().split()])
now_t = 0
now_x = 0
now_y = 0
cnt=0
for t in T:
    if t[0]%2 !=(t[1]+t[2])%2:
        print('No')
        exit()
        
    if t[0] -now_t  >= abs(t[1]-now_x)+abs(t[2]-now_y):
        now_t = t[0]
        now_x = t[1]
        now_y = t[2]
    else:
        print('No')
        exit()
print('Yes')