#!/mnt/c/Users/moiki/bash/env/bin/python

N = int(eval(input()))

from collections import defaultdict, Counter



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

diff = lambda a,b : abs(a[0] - b[0]) + abs(a[1] - b[1])



pos = (0,0)

tim = 0



for i in range(N):

    distance = diff(pos, t[i][1:])

    dis_time = t[i][0] - tim

    if not dis_time % 2 == distance %2 or not dis_time>=distance:

        print("No")

        exit(0)

print("Yes")

exit(0)



# d = defaultdict(int)

# 

# for _ in range(N):

#     s = input()

#     d[s[0]] += 1



# print(d)



ans = 0

charlist = list("MARCH")

for i in range(1<<5):

    if not Counter( list ( "{0:05b}".format(i)) )["1"] == 3:

        continue

    

    s = 1

    for e,i in enumerate(list("{0:05b}".format(i))):

        if i == "1":

            s *= d[ charlist[e] ]



    ans += s

print(ans)

    

N=int(eval(input()))

nt=0

np=(0,0)

ok=True

for t,x,y in [list(map(int,input().split())) for _ in range(N)]:

  el,nt=t-nt,t

  dist=abs(np[0]-x)+abs(np[1]-y)

  

  if el<dist: 

    ok=False 

    break

  if (el-dist)%2!=0:

    ok=False 

    break

  np=(x,y)

if ok:

  print("Yes")

else:

  print("No")
#!/mnt/c/Users/moiki/bash/env/bin/python
N = int(eval(input()))
from collections import defaultdict, Counter

t = [list(map(int, input().split())) for _ in range(N)]
diff = lambda a, b: abs(a[0] - b[0]) + abs(a[1] - b[1])
pos = (0, 0)
tim = 0
for i in range(N):
    distance = diff(pos, t[i][1:])
    dis_time = t[i][0] - tim
    if not dis_time % 2 == distance % 2 or not dis_time >= distance:
        print("No")
        exit(0)
print("Yes")
exit(0)
# d = defaultdict(int)
#
# for _ in range(N):
#     s = input()
#     d[s[0]] += 1
# print(d)
ans = 0
charlist = list("MARCH")
for i in range(1 << 5):
    if not Counter(list("{0:05b}".format(i)))["1"] == 3:
        continue
    s = 1
    for e, i in enumerate(list("{0:05b}".format(i))):
        if i == "1":
            s *= d[charlist[e]]
    ans += s
print(ans)

N = int(eval(input()))
nt = 0
np = (0, 0)
ok = True
for t, x, y in [list(map(int, input().split())) for _ in range(N)]:
    el, nt = t - nt, t
    dist = abs(np[0] - x) + abs(np[1] - y)
    if el < dist:
        ok = False
        break
    if (el - dist) % 2 != 0:
        ok = False
        break
    np = (x, y)
if ok:
    print("Yes")
else:
    print("No")

-#!/mnt/c/Users/moiki/bash/env/bin/python -from collections import defaultdict, Counter - -t = [list(map(int, input().split())) for _ in range(N)] -diff = lambda a, b: abs(a[0] - b[0]) + abs(a[1] - b[1]) -pos = (0, 0) -tim = 0 -for i in range(N): -    distance = diff(pos, t[i][1:]) -    dis_time = t[i][0] - tim -    if not dis_time % 2 == distance % 2 or not dis_time >= distance: -        print("No") -        exit(0) -print("Yes") -exit(0) -# d = defaultdict(int) -# -# for _ in range(N): -#     s = input() -#     d[s[0]] += 1 -# print(d) -ans = 0 -charlist = list("MARCH") -for i in range(1 << 5): -    if not Counter(list("{0:05b}".format(i)))["1"] == 3: -        continue -    s = 1 -    for e, i in enumerate(list("{0:05b}".format(i))): -        if i == "1": -            s *= d[charlist[e]] -    ans += s -print(ans) +nt = 0 +np = (0, 0) +ok = True +for t, x, y in [list(map(int, input().split())) for _ in range(N)]: +    el, nt = t - nt, t +    dist = abs(np[0] - x) + abs(np[1] - y) +    if el < dist: +        ok = False +        break +    if (el - dist) % 2 != 0: +        ok = False +        break +    np = (x, y) +if ok: +    print("Yes") +else: +    print("No")