def dist(x,y):

    return abs(x[0]-y[0])+abs(x[1]-y[1])

N = int(eval(input()))

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

X.insert(0,[0,0,0])

flag = 0

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

    dx = dist(X[i][1:],X[i-1][1:])

    dt = X[i][0]-X[i-1][0]

    if dt>=dx and (dt-dx)%2==0:

        continue

    else:

        flag = 1

        break

if flag==0:

    print("Yes")

else:

    print("No")
def dist(x,y):

    return abs(x[0]-y[0])+abs(x[1]-y[1])

N = int(eval(input()))

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

flag = 0

t1,x1,y1 = 0,0,0

for i in range(N):

    t2,x2,y2 = X[i]

    d = dist((x1,y1),(x2,y2))

    dt = t2-t1

    if dt>=d and (dt-d)%2==0:

        t1,x1,y1 = X[i]

    else:

        flag=1

        break

if flag==0:

    print("Yes")

else:

    print("No")
def dist(x, y):
    return abs(x[0] - y[0]) + abs(x[1] - y[1])


N = int(eval(input()))
X = [list(map(int, input().split())) for _ in range(N)]
X.insert(0, [0, 0, 0])
flag = 0
for i in range(1, N + 1):
    dx = dist(X[i][1:], X[i - 1][1:])
    dt = X[i][0] - X[i - 1][0]
    if dt >= dx and (dt - dx) % 2 == 0:
        continue
    else:
        flag = 1
        break
if flag == 0:
    print("Yes")
else:
    print("No")

def dist(x, y):
    return abs(x[0] - y[0]) + abs(x[1] - y[1])


N = int(eval(input()))
X = [list(map(int, input().split())) for _ in range(N)]
flag = 0
t1, x1, y1 = 0, 0, 0
for i in range(N):
    t2, x2, y2 = X[i]
    d = dist((x1, y1), (x2, y2))
    dt = t2 - t1
    if dt >= d and (dt - d) % 2 == 0:
        t1, x1, y1 = X[i]
    else:
        flag = 1
        break
if flag == 0:
    print("Yes")
else:
    print("No")

-X.insert(0, [0, 0, 0]) -for i in range(1, N + 1): -    dx = dist(X[i][1:], X[i - 1][1:]) -    dt = X[i][0] - X[i - 1][0] -    if dt >= dx and (dt - dx) % 2 == 0: -        continue +t1, x1, y1 = 0, 0, 0 +for i in range(N): +    t2, x2, y2 = X[i] +    d = dist((x1, y1), (x2, y2)) +    dt = t2 - t1 +    if dt >= d and (dt - d) % 2 == 0: +        t1, x1, y1 = X[i]