Buggy python submission (verdict: Time Limit Exceeded):
import sys
def check(t,x,y,nt,nx,ny):
    # print(t)
    # print(x)
    # print(y)
    tempt = nt
    tempx = nx
    tempy = ny
    judge = True
    if (x+y) > (nx+ny+t):
        print("No")
        sys.exit()
    #x方向の移動
    while x != tempx:
        if (x>tempx):
            tempx += 1
            tempt += 1
        elif(x<tempx):
            tempx -= 1
            tempt += 1
    #y方向の移動
    if tempt<=t:
        while y != tempy:
            if (y>tempy):
                tempy += 1
                tempt += 1
            elif(x<tempy):
                tempy -= 1
                tempt += 1
    else:
        print("No")
        sys.exit()
    if (t-tempt)%2 != 0:
        print("No")
        sys.exit()     

    return tempt,tempx,tempy
N = int(input())
nt = 0
nx = 0
ny = 0
t = []
x = []
y = []
#入力
for i in range(N):
    temp = input().split(" ")
    t.append(temp[0])
    x.append(temp[1])
    y.append(temp[2])

for i in range(N):
    nt,nx,ny = check(int(t[i]), int(x[i]), int(y[i]),nt,nx,ny)

print("Yes")

Fixed submission:
import sys
def check_ans(t,x,y,nt,nx,ny):
    if (x+y) > (nx+ny+t):
        print("No")
        sys.exit()    
    if (x >= nx):
        nt += (x-nx)
    elif(x <= nx):
        nt += (nx-x)
    if (y >= ny):
        nt += (y-ny)
    elif(y <= ny):
        nt += (ny-y)
    if (t-nt)%2 != 0:
        print("No")
        sys.exit()

N = int(input())
nt = 0
nx = 0
ny = 0
t = []
x = []
y = []
#入力
for i in range(N):
    temp = input().split(" ")
    t.append(temp[0])
    x.append(temp[1])
    y.append(temp[2])
for i in range(N):
    if i == 0:
        check_ans(int(t[i]), int(x[i]), int(y[i]), nt, nx, ny)
    else:
        nt = int(t[i-1])
        nx = int(x[i-1])
        ny = int(y[i-1])
    check_ans(int(t[i]), int(x[i]), int(y[i]), nt, nx, ny)
print("Yes")

Buggy python submission (verdict: Time Limit Exceeded):
import sys
def check(t,x,y,nt,nx,ny):
    # print(t)
    # print(x)
    # print(y)
    tempt = nt
    tempx = nx
    tempy = ny
    judge = True
    if (x+y) > (nx+ny+t):
        print("No")
        sys.exit()
    #x方向の移動
    while x != tempx:
        if (x>tempx):
            tempx += 1
            tempt += 1
        elif(x<tempx):
            tempx -= 1
            tempt += 1
    #y方向の移動
    if tempt<=t:
        while y != tempy:
            if (y>tempy):
                tempy += 1
                tempt += 1
            elif(x<tempy):
                tempy -= 1
                tempt += 1
    else:
        print("No")
        sys.exit()
    if (t-tempt)%2 != 0:
        print("No")
        sys.exit()     

    return tempt,tempx,tempy
N = int(input())
nt = 0
nx = 0
ny = 0
t = []
x = []
y = []
#入力
for i in range(N):
    temp = input().split(" ")
    t.append(temp[0])
    x.append(temp[1])
    y.append(temp[2])

for i in range(N):
    na,nb,nc = check(int(t[i]), int(x[i]), int(y[i]),nt,nx,ny)

print("Yes")

Fixed submission:
import sys
def check_ans(t,x,y,nt,nx,ny):
    if (x+y) > (nx+ny+t):
        print("No")
        sys.exit()    
    if (x >= nx):
        nt += (x-nx)
    elif(x <= nx):
        nt += (nx-x)
    if (y >= ny):
        nt += (y-ny)
    elif(y <= ny):
        nt += (ny-y)
    if (t-nt)%2 != 0:
        print("No")
        sys.exit()

N = int(input())
nt = 0
nx = 0
ny = 0
t = []
x = []
y = []
#入力
for i in range(N):
    temp = input().split(" ")
    t.append(temp[0])
    x.append(temp[1])
    y.append(temp[2])
for i in range(N):
    if i == 0:
        check_ans(int(t[i]), int(x[i]), int(y[i]), nt, nx, ny)
    else:
        nt = int(t[i-1])
        nx = int(x[i-1])
        ny = int(y[i-1])
    check_ans(int(t[i]), int(x[i]), int(y[i]), nt, nx, ny)
print("Yes")