Buggy python submission (verdict: Runtime Error):
n = int(input())
t_state, x_state, y_state = 0, 0, 0
for i in range(n):
    t, x, y = map(int, input().split())
    d = abs(x - x_state) + abs(y - y_state)
    td = t - t_state
    if  td < d or td%2 != d%2
        print("No")
        exit()
    t_state, x_state, y_state = t, x, y
print("Yes")

Fixed submission:
n = int(input())
t_state, x_state, y_state = 0, 0, 0
for i in range(n):
    t, x, y = map(int, input().split())
    d = abs(x - x_state) + abs(y - y_state)
    td = t - t_state
    if  td < d or td%2 != d%2:
        print("No")
        exit()
    t_state, x_state, y_state = t, x, y
print("Yes")

Buggy python submission (verdict: Runtime Error):
n = int(input())
t_state, x_state, y_state = 0, 0, 0
for i in range(n):
    t, x, y = map(int, input().split())
    d = abs(x - x_state) + abs(y - y_state)
    td = t - t_state
    if  td < d or td%2 != d%2
        print("No")
        exit()
    t_state, x_state, y_state = t, x, y
print("Yes")
    

Fixed submission:
n = int(input())
t_state, x_state, y_state = 0, 0, 0
for i in range(n):
    t, x, y = map(int, input().split())
    d = abs(x - x_state) + abs(y - y_state)
    td = t - t_state
    if  td < d or td%2 != d%2:
        print("No")
        exit()
    t_state, x_state, y_state = t, x, y
print("Yes")

Buggy python submission (verdict: Runtime Error):
n = int(input())
t_state = 0
x_state = 0
y_state = 0
for i in range(n):
    t, x, y = map(int, input().split())
    d = abs(x - x_state) + abs(y - y_state)
    if  t - t_state < d or (t-t_state)%2 != d%2
        print("No")
        exit()
    t_state = t
    x_state = x
    y_state = y
print("Yes")

Fixed submission:
n = int(input())
t_state, x_state, y_state = 0, 0, 0
for i in range(n):
    t, x, y = map(int, input().split())
    d = abs(x - x_state) + abs(y - y_state)
    td = t - t_state
    if  td < d or td%2 != d%2:
        print("No")
        exit()
    t_state, x_state, y_state = t, x, y
print("Yes")

Buggy python submission (verdict: Runtime Error):
n = int(input())
l = [[0,0,0]]
l.append([[list(map(int, input().split())) for i in range(n)]])
for i in range(n):
    if abs(l[i+1][1] + l[i+1][2] - l[i][1] - l[i][2]) != 1:
        print("No")
        exit()
print("Yes")

Fixed submission:
n = int(input())
t_state, x_state, y_state = 0, 0, 0
for i in range(n):
    t, x, y = map(int, input().split())
    d = abs(x - x_state) + abs(y - y_state)
    td = t - t_state
    if  td < d or td%2 != d%2:
        print("No")
        exit()
    t_state, x_state, y_state = t, x, y
print("Yes")

Buggy python submission (verdict: Runtime Error):
n = int(input())
l = [[0,0,0]]
l.append([[list(map(int, input().split())) for i in range(n)]])
for i in range(n):
    if abs(l[i+1][1] + l[i+1][2] - l[i][1] - l[i][2]) != 1:
        print("No")
        exit()
print("Yes")

Fixed submission:
n = int(input())
t_state, x_state, y_state = 0, 0, 0
for i in range(n):
    t, x, y = map(int, input().split())
    d = abs(x - x_state) + abs(y - y_state)
    td = t - t_state
    if  td < d or td%2 != d%2:
        print("No")
        exit()
    t_state, x_state, y_state = t, x, y
print("Yes")

Buggy python submission (verdict: Runtime Error):
n = int(input())
x_state = 0
y_state = 0
for i in range(n):
    t, x, y = map(int, input().split())
    if abs(x + y - x_state - y_state) != 1:
        print("No")
        exit()
    x_state = x.copy()
    y_state = y.copy()
print("Yes")
    

Fixed submission:
n = int(input())
t_state, x_state, y_state = 0, 0, 0
for i in range(n):
    t, x, y = map(int, input().split())
    d = abs(x - x_state) + abs(y - y_state)
    td = t - t_state
    if  td < d or td%2 != d%2:
        print("No")
        exit()
    t_state, x_state, y_state = t, x, y
print("Yes")