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")

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")

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")

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")

-x = [0] -y = [0] -t = [0] -fl = True +x = 0 +y = 0 +t = 0 +a = 0 -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 +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 -    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: +    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: