def ynf(dt,dx,dy):

#    print(dt,dx,dy)

    if (dx+dy)>dt:

        return 0

    if (dx+dy)%2 != dt%2:

        return 0

    return 1



icase=0

if icase==0:

    n=int(eval(input()))

    txy=[]

    for i in range(n):

        txy.append(list(map(int,input().split())))

elif icase==1:

    n=2

    txy=[]

    txy.append([3, 1, 2])

    txy.append([6, 1, 1])

elif icase==2:

    n=1

    txy=[]

    txy.append([2, 100, 100])

elif icase==3:

    n=2

    txy=[]

    txy.append([5, 1, 1])

    txy.append([100, 1, 1])



dt=txy[0][0]

dx=txy[0][1]

dy=txy[0][2]



yn=1

for i in range(n):

    if ynf(dt,dx,dy)==0:

        yn=0

        break

    elif i==n-1:

        break

    else:

        dt=txy[i+1][0]-txy[i][0]

        dx=txy[i+1][1]-txy[i][1]

        dy=txy[i+1][2]-txy[i][2]

        

if yn==0:

    print("No")

else:

    print("Yes")

n=int(eval(input()))

t=[0]*(n+1)

x=[0]*(n+1)

y=[0]*(n+1)



for i in range(1,n+1):

    t[i],x[i],y[i]=list(map(int,input().split()))

    

yn=""

for i in range(n):

    ti=t[i+1]-t[i]

    d=abs(x[i+1]-x[i])+abs(y[i+1]-y[i])

    if d>ti or ti%2!=d%2:

        yn="No"

        break

    

if yn=="No":

    print("No")

else:

    print("Yes")

    
def ynf(dt, dx, dy):
    #    print(dt,dx,dy)
    if (dx + dy) > dt:
        return 0
    if (dx + dy) % 2 != dt % 2:
        return 0
    return 1


icase = 0
if icase == 0:
    n = int(eval(input()))
    txy = []
    for i in range(n):
        txy.append(list(map(int, input().split())))
elif icase == 1:
    n = 2
    txy = []
    txy.append([3, 1, 2])
    txy.append([6, 1, 1])
elif icase == 2:
    n = 1
    txy = []
    txy.append([2, 100, 100])
elif icase == 3:
    n = 2
    txy = []
    txy.append([5, 1, 1])
    txy.append([100, 1, 1])
dt = txy[0][0]
dx = txy[0][1]
dy = txy[0][2]
yn = 1
for i in range(n):
    if ynf(dt, dx, dy) == 0:
        yn = 0
        break
    elif i == n - 1:
        break
    else:
        dt = txy[i + 1][0] - txy[i][0]
        dx = txy[i + 1][1] - txy[i][1]
        dy = txy[i + 1][2] - txy[i][2]
if yn == 0:
    print("No")
else:
    print("Yes")

n = int(eval(input()))
t = [0] * (n + 1)
x = [0] * (n + 1)
y = [0] * (n + 1)
for i in range(1, n + 1):
    t[i], x[i], y[i] = list(map(int, input().split()))
yn = ""
for i in range(n):
    ti = t[i + 1] - t[i]
    d = abs(x[i + 1] - x[i]) + abs(y[i + 1] - y[i])
    if d > ti or ti % 2 != d % 2:
        yn = "No"
        break
if yn == "No":
    print("No")
else:
    print("Yes")

-def ynf(dt, dx, dy): -    #    print(dt,dx,dy) -    if (dx + dy) > dt: -        return 0 -    if (dx + dy) % 2 != dt % 2: -        return 0 -    return 1 - - -icase = 0 -if icase == 0: -    n = int(eval(input())) -    txy = [] -    for i in range(n): -        txy.append(list(map(int, input().split()))) -elif icase == 1: -    n = 2 -    txy = [] -    txy.append([3, 1, 2]) -    txy.append([6, 1, 1]) -elif icase == 2: -    n = 1 -    txy = [] -    txy.append([2, 100, 100]) -elif icase == 3: -    n = 2 -    txy = [] -    txy.append([5, 1, 1]) -    txy.append([100, 1, 1]) -dt = txy[0][0] -dx = txy[0][1] -dy = txy[0][2] -yn = 1 +n = int(eval(input())) +t = [0] * (n + 1) +x = [0] * (n + 1) +y = [0] * (n + 1) +for i in range(1, n + 1): +    t[i], x[i], y[i] = list(map(int, input().split())) +yn = "" -    if ynf(dt, dx, dy) == 0: -        yn = 0 +    ti = t[i + 1] - t[i] +    d = abs(x[i + 1] - x[i]) + abs(y[i + 1] - y[i]) +    if d > ti or ti % 2 != d % 2: +        yn = "No" -    elif i == n - 1: -        break -    else: -        dt = txy[i + 1][0] - txy[i][0] -        dx = txy[i + 1][1] - txy[i][1] -        dy = txy[i + 1][2] - txy[i][2] -if yn == 0: +if yn == "No":