Buggy python submission (verdict: Runtime Error):
#!/usr/bin/python3
# -*- coding: utf-8 -*-

import numpy as np

N = int(input())
dst = np.array([[int(x) for x in input().split(" ")] for z in range(N)])
prev_dst = np.array([0] * 3)

for n in range(N):
    t,x,y = map(int, input().split(" "))
    a = (prev_dst[0] - t) - (np.abs(prev_dst[1]-x) + np.abs(prev_dst[2]-y))
    if a >= 0 and a % 2 == 0:
        prev_dst = [t,x,y]
    else:
        print("No")
        exit(0)

print("Yes")



Fixed submission:
#!/usr/bin/python3
# -*- coding: utf-8 -*-

import numpy as np

N = int(input())
prev_dst = [0,0,0]

for n in range(N):
    t, x, y = map(int, input().split(" "))
    a = (t - prev_dst[0]) - (np.abs(prev_dst[1]-x) + np.abs(prev_dst[2]-y))
    if a >= 0 and a % 2 == 0:
        prev_dst = [t, x, y]
    else:
        print("No")
        exit(0)

print("Yes")

Buggy python submission (verdict: Time Limit Exceeded):
#!/usr/bin/python3
# -*- coding: utf-8 -*-

import numpy as np


def canReach(src, dst):
    a = (dst[0] - src[0]) - np.sum(np.abs(src-dst)[1:3])
    if a >= 0 and a % 2 == 0:
        return True
    return False


N = int(input())
# dst = np.array([[int(x) for x in input().split(" ")] for z in range(N)])
available = True
prev_dst = np.array([0] * 3)

for n in range(N):
    t,x,y = map(int, input().split(" "))
    if canReach(prev_dst, np.array([t,x,y])):
        prev_dst = np.array([t,x,y])
    else:
        available = False
        break

if available:
    print("Yes")
else:
    print("No")



Fixed submission:
#!/usr/bin/python3
# -*- coding: utf-8 -*-

import numpy as np

N = int(input())
prev_dst = [0,0,0]

for n in range(N):
    t, x, y = map(int, input().split(" "))
    a = (t - prev_dst[0]) - (np.abs(prev_dst[1]-x) + np.abs(prev_dst[2]-y))
    if a >= 0 and a % 2 == 0:
        prev_dst = [t, x, y]
    else:
        print("No")
        exit(0)

print("Yes")

Buggy python submission (verdict: Time Limit Exceeded):
#!/usr/bin python3
# -*- coding: utf-8 -*-

import numpy as np


def canReach(src, dst):
    a = (dst[0] - src[0]) - np.sum(np.abs(src-dst)[1:3])
    if a >= 0 and a % 2 == 0:
        return True
    return False


N = int(input())
dst = np.array([[int(x) for x in input().split(" ")] for z in range(N)])
available = True
dst = np.vstack((np.array([0, 0, 0]),dst))

for n in range(N):
    if not canReach(dst[n], dst[n+1]):
        available = False
        break

if available:
    print("Yes")
else:
    print("No")



Fixed submission:
#!/usr/bin/python3
# -*- coding: utf-8 -*-

import numpy as np

N = int(input())
prev_dst = [0,0,0]

for n in range(N):
    t, x, y = map(int, input().split(" "))
    a = (t - prev_dst[0]) - (np.abs(prev_dst[1]-x) + np.abs(prev_dst[2]-y))
    if a >= 0 and a % 2 == 0:
        prev_dst = [t, x, y]
    else:
        print("No")
        exit(0)

print("Yes")

Buggy python submission (verdict: Time Limit Exceeded):
#!/usr/bin python3
# -*- coding: utf-8 -*-

import numpy as np

def canReach(src, dst):
    a = (dst[0] - src[0]) - np.sum(np.abs(src-dst)[1:3])
    if a >= 0 and a % 2 == 0:
        return True
    return False

N = int(input())
dst = np.array([[int(x) for x in input().split(" ")] for z in range(N)])

available = True
pos = [0, 0, 0]

for n in range(N):
    if not canReach(pos, dst[n]):
        available = False
        break
    else:
        pos = dst[n]

if available:
    print("Yes")
else:
    print("No")



Fixed submission:
#!/usr/bin/python3
# -*- coding: utf-8 -*-

import numpy as np

N = int(input())
prev_dst = [0,0,0]

for n in range(N):
    t, x, y = map(int, input().split(" "))
    a = (t - prev_dst[0]) - (np.abs(prev_dst[1]-x) + np.abs(prev_dst[2]-y))
    if a >= 0 and a % 2 == 0:
        prev_dst = [t, x, y]
    else:
        print("No")
        exit(0)

print("Yes")

Buggy python submission (verdict: Time Limit Exceeded):
#!/usr/bin python3
# -*- coding: utf-8 -*-

import numpy as np

def canReach(src, dst):
    dist = np.sum(np.abs(src-dst)[1:3])
    time = (dst[0] - src[0])
    if time - dist >= 0 and (time - dist) % 2 == 0:
        return True
    return False

N = int(input())
dst = np.array([[int(x) for x in input().split(" ")] for z in range(N)])

available = True
pos = [0, 0, 0]

for n in range(N):
    if not canReach(pos, dst[n]):
        available = False
        break
    else:
        pos = dst[n]

if available:
    print("Yes")
else:
    print("No")



Fixed submission:
#!/usr/bin/python3
# -*- coding: utf-8 -*-

import numpy as np

N = int(input())
prev_dst = [0,0,0]

for n in range(N):
    t, x, y = map(int, input().split(" "))
    a = (t - prev_dst[0]) - (np.abs(prev_dst[1]-x) + np.abs(prev_dst[2]-y))
    if a >= 0 and a % 2 == 0:
        prev_dst = [t, x, y]
    else:
        print("No")
        exit(0)

print("Yes")

Buggy python submission (verdict: Time Limit Exceeded):
#!/usr/bin python3
# -*- coding: utf-8 -*-

import numpy as np

def canReach(src, dst):
    dist = np.sum(np.abs(src-dst)[1:3])
    time = (dst[0] - src[0])
    if time - dist == 0:
        return True
    elif time - dist > 0 and (time - dist) % 2 == 0:
        return True
    return False

N = int(input())
dst = np.array([[int(x) for x in input().split(" ")] for z in range(N)])

available = True
pos = [0, 0, 0]

for n in range(N):
    if not canReach(pos, dst[n]):
        available = False
        break
    else:
        pos = dst[n]

if available:
    print("Yes")
else:
    print("No")

Fixed submission:
#!/usr/bin/python3
# -*- coding: utf-8 -*-

import numpy as np

N = int(input())
prev_dst = [0,0,0]

for n in range(N):
    t, x, y = map(int, input().split(" "))
    a = (t - prev_dst[0]) - (np.abs(prev_dst[1]-x) + np.abs(prev_dst[2]-y))
    if a >= 0 and a % 2 == 0:
        prev_dst = [t, x, y]
    else:
        print("No")
        exit(0)

print("Yes")

Buggy python submission (verdict: Time Limit Exceeded):
#!/usr/bin python3
# -*- coding: utf-8 -*-

import numpy as np


def canReach(src, dst):
    dist = np.sum(np.abs([dst[1] - src[1], dst[2] - src[2]]))

    if (dst[0] - src[0]) - dist == 0:
        return True
    elif (dst[0] - src[0]) - dist > 0 and ((dst[0] - src[0]) - dist) % 2 == 0:
        return True
    return False


N = int(input())
dst = [[int(x) for x in input().split(" ")] for z in range(N)]

available = True
pos = [0, 0, 0]

for n in range(N):
    if not canReach(pos, dst[n]):
        available = False
        break
    else:
        pos = dst[n]

if available:
    print("Yes")
else:
    print("No")

Fixed submission:
#!/usr/bin/python3
# -*- coding: utf-8 -*-

import numpy as np

N = int(input())
prev_dst = [0,0,0]

for n in range(N):
    t, x, y = map(int, input().split(" "))
    a = (t - prev_dst[0]) - (np.abs(prev_dst[1]-x) + np.abs(prev_dst[2]-y))
    if a >= 0 and a % 2 == 0:
        prev_dst = [t, x, y]
    else:
        print("No")
        exit(0)

print("Yes")