ZhenlongDai/ACPR huggingface dataset:
Problem: p03435
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
lc = [[int(w) for w in input().split()] for i in range(3)]
cond = False

lb = lc[0]
a2 = lc[1][0]-lb[0]
a3 = lc[2][0]-lb[0]
la = [0, a2, a3]
for i in range(3):
    for j in range(3):
        if lc[i][j] != la[i]+lb[j]:
            cond = False
            break

print("Yes" if cond else "No")


Failing test case input:
0 8 8
0 8 8
0 8 8

Expected output:
Yes

Actual output:
No


Fixed submission (verdict: Accepted):
lc = [[int(w) for w in input().split()] for i in range(3)]
cond = True

lb = lc[0]
a2 = lc[1][0]-lb[0]
a3 = lc[2][0]-lb[0]
la = [0, a2, a3]
for i in range(3):
    for j in range(3):
        if lc[i][j] != la[i]+lb[j]:
            cond = False
            break

print("Yes" if cond else "No")

Problem: p03435
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
rows = []
for _ in range(3):
  rows.append(list(map(int, input().split())))
for i in range(3):
  for j in range(3):
    rows[i][j] -= rows[i][0]
ok = True
for j in range(3):
  for i in range(3):
    if rows[i][j] != rows[0][j]:
      ok = False
if ok: print("Yes")
else: print("No")

Failing test case input:
1 0 1
2 1 2
1 0 1

Expected output:
Yes

Actual output:
No


Fixed submission (verdict: Accepted):
rows = []
for _ in range(3):
  rows.append(list(map(int, input().split())))
for i in range(3):
  for j in range(2, -1, -1):
    rows[i][j] -= rows[i][0]
ok = True
for j in range(3):
  for i in range(3):
    if rows[i][j] != rows[0][j]:
      ok = False
if ok: print("Yes")
else: print("No")

Problem: p03435
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
C = [list(map(lambda x:int(x),input().split())) for i in range(3)]

a,b,c = C[0],C[1],C[2]
if (a[0]-a[1])==(b[0]-b[1]) and (a[2]-a[1])==(b[2]-b[1]):
    print("Yes")
else:
    print("No")

Failing test case input:
0 8 8
0 8 8
0 0 8

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
C = [list(map(lambda x:int(x),input().split())) for i in range(3)]

a,b,c = C[0],C[1],C[2]
if ((a[0]-a[1])==(b[0]-b[1]) and (b[0]-b[1])==(c[0]-c[1])) and\
   ((a[2]-a[1])==(b[2]-b[1]) and (b[2]-b[1])==(c[2]-c[1])):
    print("Yes")
else:
    print("No")

Problem: p03435
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
c_table = [list(map(int, input().split())) for _ in range(3)]
a = [0]*3
b = [0]*3


for i in range(3):
    b[i] = c_table[0][i]-0

for i in range(3):
    a[i] = c_table[0][i]-b[i]

for i in range(3):
    for j in range(3):
        if a[i]-b[j] == c_table[i][j]:
            print('Yes')
            exit()
print('No')

Failing test case input:
12 -1 0
2 2 3
4 -4 1

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
c_table = [list(map(int, input().split())) for _ in range(3)]
a = [0]*3
b = [0]*3


for i in range(3):
    b[i] = c_table[0][i]

for i in range(3):
    a[i] = c_table[i][0]-b[0]

for i in range(3):
    for j in range(3):
        
        if a[i]+b[j] != c_table[i][j]:
            print('No')
            exit()
print('Yes')
Problem: p03435
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a=[0,0,0]
b=[0,0,0]
c=[0,0,0]
a[0],a[1],a[2]=map(int,input().split())
b[0],b[1],b[2]=map(int,input().split())
c[0],c[1],c[2]=map(int,input().split())
flag=0
if((a[0]-b[0])==(a[1]-b[1])) and ((a[0]-b[0])==(a[2]-b[2])):
  if((a[1]-a[0])==(b[1]-b[0])) and ((a[2]-a[0])==(b[2]-b[0])):
    flag=1
if flag==0:
  print("No")
else:
  print("Yes")


Failing test case input:
2 3 2
0 1 0
1 2 2

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
a=[0,0,0]
b=[0,0,0]
c=[0,0,0]
a[0],a[1],a[2]=map(int,input().split())
b[0],b[1],b[2]=map(int,input().split())
c[0],c[1],c[2]=map(int,input().split())
flag=0
flag_2=0
if((a[0]-b[0])==(a[1]-b[1])) and ((a[0]-b[0])==(a[2]-b[2])):
  if((a[0]-c[0])==(a[1]-c[1])) and ((a[0]-c[0])==(a[2]-c[2])):
    flag=1
if((a[1]-a[0])==(b[1]-b[0])) and ((a[2]-a[0])==(b[2]-b[0])):
  if((a[1]-a[0])==(c[1]-c[0])) and ((a[2]-a[0])==(c[2]-c[0])):
    flag_2=1
if flag==1 and flag_2==1:
  print("Yes")
else:
  print("No")

Problem: p03435
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
c = [list(map(int, input().split())) for i in range(3)]

a = [0, -1, -1]
b = [0, 0, 0]
for i in range(3):
    b[i] = c[0][i] - a[0]
a[1] = c[1][1] - b[1]

flag = True
for i in range(3):
    for j in range(3):
        if a[i] + b[j] == c[i][j]:
            pass
        else:
            flag = False
            break

if flag:
    print('Yes')
else:
    print('No')

Failing test case input:
0 8 8
0 8 8
0 8 8

Expected output:
Yes

Actual output:
No


Fixed submission (verdict: Accepted):
c = [list(map(int, input().split())) for i in range(3)]

a = [0, -1, -1]
b = [0, 0, 0]
for i in range(3):
    b[i] = c[0][i] - a[0]
a[1] = c[1][1] - b[1]
a[2] = c[2][1] - b[1]

flag = True
for i in range(3):
    for j in range(3):
        if a[i] + b[j] == c[i][j]:
            pass
        else:
            flag = False
            break

if flag:
    print('Yes')
else:
    print('No')

Problem: p03435
Buggy submission (Python (3.4.3), verdict: Wrong Answer):


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

for i in range(2):
  for j in range(2):
    if c[i][j] - c[i][j+1] == c[i+1][j] - c[i+1][j+1]:
      pass
    else:
      print('NO')
      exit()
      
print('YES')

Failing test case input:
2 3 2
2 1 -1
1 2 2

Expected output:
No


Actual output:
NO


Fixed submission (verdict: Accepted):


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

for i in range(2):
  for j in range(2):
    if c[i][j] - c[i][j+1] == c[i+1][j] - c[i+1][j+1]:
      pass
    else:
      print('No')
      exit()
      
print('Yes')
Problem: p03435
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
c = ['' for _ in range(3)]
c[0] = list(map(int, input().split()))
c[1] = list(map(int, input().split()))
c[2] = list(map(int, input().split()))
ans = 'Yes'
print(c)
for i in range(2):
    for j in range(2):
        if c[i][j] + c[i + 1][j + 1] != c[i][j + 1] + c[i + 1][j]:
            ans = 'No'
            break
    else:
        continue
    break
print(ans)


Failing test case input:
4 3 2
0 1 2
1 0 2

Expected output:
No


Actual output:
[[4, 3, 2], [0, 1, 2], [1, 0, 2]]
No


Fixed submission (verdict: Accepted):
c = ['' for _ in range(3)]
c[0] = list(map(int, input().split()))
c[1] = list(map(int, input().split()))
c[2] = list(map(int, input().split()))
ans = 'Yes'
for i in range(2):
    for j in range(2):
        if c[i][j] + c[i + 1][j + 1] != c[i][j + 1] + c[i + 1][j]:
            ans = 'No'
            break
    else:
        continue
    break
print(ans)

Problem: p03435
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
C = [list(map(int, input().split())) for i in range(3)]

for a1 in range(101):
    for a2 in range(101):
        for a3 in range(101):
            if (C[0][0]-a1) == (C[1][0]-a2) == (C[2][0]-a3):
                if (C[0][1]-a1) == (C[1][1]-a2) == (C[2][1]-a3):
                    if (C[0][2] - a1) == (C[1][2] - a2) == (C[2][2] - a3):
                        print("YES")
                        exit()
print("NO")

Failing test case input:
4 9 3
0 2 2
1 0 2

Expected output:
No


Actual output:
NO


Fixed submission (verdict: Accepted):
C = [list(map(int, input().split())) for i in range(3)]

for a1 in range(101):
    for a2 in range(101):
        for a3 in range(101):
            if (C[0][0]-a1) == (C[1][0]-a2) == (C[2][0]-a3):
                if (C[0][1]-a1) == (C[1][1]-a2) == (C[2][1]-a3):
                    if (C[0][2] - a1) == (C[1][2] - a2) == (C[2][2] - a3):
                        print("Yes")
                        exit()
print("No")
Problem: p03435
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
y1_list = list(map(int,input().split()))
y2_list = list(map(int,input().split()))
y3_list = list(map(int,input().split()))

a1 = list()
a2 = list()

for i in range(3):
    a1.append(y1_list[i] - y2_list[i])
    a2.append(y2_list[i] - y3_list[i])


if a1[0] == a1[1] and a1[2] == a1[0]:
    if a2[0] == a1[1] and a2[2] == a1[0]:
        print("yes")
        
    else:
        print("no")
else:
    print("no")
    


Failing test case input:
4 2 0
0 1 7
1 1 0

Expected output:
No


Actual output:
no


Fixed submission (verdict: Accepted):
y1_list = list(map(int,input().split()))
y2_list = list(map(int,input().split()))
y3_list = list(map(int,input().split()))
L = [y1_list,y2_list,y3_list]
 
a1 = list()
a2 = list()
b1 = list()
b2 = list()
 
for i in range(3):
    a1.append(y1_list[i] - y2_list[i])
    a2.append(y2_list[i] - y3_list[i])
    b1.append(L[i][0] - L[i][1])
    b2.append(L[i][1] - L[i][2])
 
 
if (a1[0] == a1[1] and a1[2] == a1[0])and(b1[0] == b1[1] and b1[2] == b1[0]):
    if (a2[0] == a2[1] and a2[2] == a2[0])and(b2[0] == b2[1] and b2[2] == b2[0]):
        print("Yes")
        
    else:
        print("No")
else:
    print("No")

Problem: p03435
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
c=[list(map(int,input().split())) for _ in range(3)]

ans = "Yes"

for i in range(2):
    if c[i+1][1]-c[i+1][0] != c[0][1]-c[0][0]:
        ans = "No"
for j in range(2):
    if c[1][i+1]-c[0][i+1] != c[1][0]-c[0][0]:
        ans = "No"

print(ans)

Failing test case input:
1 8 6
2 9 7
0 7 7

Expected output:
No

Actual output:
Yes


Fixed submission (verdict: Accepted):
c=[list(map(int,input().split())) for _ in range(3)]

ans = "Yes"

for i in range(2):
    if c[i+1][1]-c[i+1][0] != c[0][1]-c[0][0]:
        ans = "No"
    if c[i+1][2]-c[i+1][1] != c[0][2]-c[0][1]:
        ans = "No"
for j in range(2):
    if c[1][i+1]-c[0][i+1] != c[1][0]-c[0][0]:
        ans = "No"
    if c[2][i+1]-c[1][i+1] != c[2][0]-c[1][0]:
        ans = "No"

print(ans)

Problem: p03435
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
c = [[0, 0, 0] for _ in range(3)]
for i in range(3):
    c[i] = list(map(int, input().split()))

a = [0, 0, 0]
b = [0, 0, 0]

for a1 in range(min(c[0])+1):
    b = [c[i][0] - a1, c[i][1] - a1, c[i][2] - a1]
    if c[1][0] - b[0] == c[1][1] - b[1] == c[1][2] - b[2]:
        if c[2][0] - b[0] == c[2][1] - b[1] == c[2][2] - b[2]:
            print("Yes")
            exit()
print("No")


Failing test case input:
0 8 3
0 8 8
0 8 8

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
c = [[0, 0, 0] for _ in range(3)]
for i in range(3):
    c[i] = list(map(int, input().split()))

for a1 in range(min(c[0])+1):
    b = [c[0][0] - a1, c[0][1] - a1, c[0][2] - a1]
    if c[1][0] - b[0] == c[1][1] - b[1] == c[1][2] - b[2]:
        if c[2][0] - b[0] == c[2][1] - b[1] == c[2][2] - b[2]:
            print("Yes")
            exit()
print("No")
Problem: p03435
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
y1_list = list(map(int,input().split()))
y2_list = list(map(int,input().split()))
y3_list = list(map(int,input().split()))

a1 = list()
a2 = list()
a3 = list()
for i in range(3):
    a1.append(y1_list[i] - y2_list[i])
    a2.append(y2_list[i] - y3_list[i])
    
if a1[0] == a1[1] and a1[2] == a1[0]:
    if a2[0] == a1[1] and a2[2] == a1[0]:
        print("Yes")
        
    else:
        print("No")
else:
    print("no")
    


Failing test case input:
2 2 0
0 1 10
1 1 1

Expected output:
No


Actual output:
no


Fixed submission (verdict: Accepted):
y1_list = list(map(int,input().split()))
y2_list = list(map(int,input().split()))
y3_list = list(map(int,input().split()))
L = [y1_list,y2_list,y3_list]
 
a1 = list()
a2 = list()
b1 = list()
b2 = list()
 
for i in range(3):
    a1.append(y1_list[i] - y2_list[i])
    a2.append(y2_list[i] - y3_list[i])
    b1.append(L[i][0] - L[i][1])
    b2.append(L[i][1] - L[i][2])
 
 
if (a1[0] == a1[1] and a1[2] == a1[0])and(b1[0] == b1[1] and b1[2] == b1[0]):
    if (a2[0] == a2[1] and a2[2] == a2[0])and(b2[0] == b2[1] and b2[2] == b2[0]):
        print("Yes")
        
    else:
        print("No")
else:
    print("No")

Problem: p03435
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
l1=list(map(int,input().split()))
l2=list(map(int,input().split()))
l3=list(map(int,input().split()))
l=[l1,l2,l3]
c=l[0][0]
for i in range(3):
    for j in range(3):
        l[i][j] -=c
print(l)
if (l[1][1]==l[0][1]+l[1][0]) and (l[2][1]==l[0][1]+l[2][0]) and (l[1][2]==l[0][2]+l[1][0])and (l[2][2]==l[2][0]+l[0][2]):
    print('Yes')
else:
    print("No")


Failing test case input:
1 8 12
7 1 7
1 7 7

Expected output:
No


Actual output:
[[0, 7, 11], [6, 0, 6], [0, 6, 6]]
No


Fixed submission (verdict: Accepted):
l1=list(map(int,input().split()))
l2=list(map(int,input().split()))
l3=list(map(int,input().split()))
l=[l1,l2,l3]
c=l[0][0]
for i in range(3):
    for j in range(3):
        l[i][j] -=c
if (l[1][1]==l[0][1]+l[1][0]) and (l[2][1]==l[0][1]+l[2][0]) and (l[1][2]==l[0][2]+l[1][0])and (l[2][2]==l[2][0]+l[0][2]):
    print('Yes')
else:
    print("No")

Problem: p03435
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
c = []
c.append(list(map(int,input().split())))
c.append(list(map(int,input().split())))
c.append(list(map(int,input().split())))
sa = [[0,0,0],[0,0,0]]
for i in range(3):
    sa[0][i]=c[1][i]-c[0][i]
    sa[1][i]=c[2][i]-c[0][i]
if(all([x == sa[0][0] for x in sa[0]]) and all([x == sa[0][0] for x in sa[0]])):
    print("Yes")
else:
    print("No")


Failing test case input:
1 0 1
2 1 2
1 0 0

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
c = []
c.append(list(map(int,input().split())))
c.append(list(map(int,input().split())))
c.append(list(map(int,input().split())))
sa = [[0,0,0],[0,0,0]]
for i in range(3):
    sa[0][i]=c[1][i]-c[0][i]
    sa[1][i]=c[2][i]-c[0][i]
if(all([x == sa[0][0] for x in sa[0]]) and all([x == sa[1][0] for x in sa[1]])):
    print("Yes")
else:
    print("No")
Problem: p03435
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
c=[list(map(int,input().split())) for i in range(3)]
a = [0]*3
b = [0]*3

a = [c[0][i] for i in range(3)]
b = [c[i][0]-a[0] for i in range(3)]
d = 0
for i in range(3):
    for j in range(3):
        if a[j] + b[i] != c[i][j]:
            print("No")
            d = 1
if d == 0:
    print("Yes")


Failing test case input:
7 0 3
2 1 3
2 -1 3

Expected output:
No


Actual output:
No
No
No
No


Fixed submission (verdict: Accepted):
c=[list(map(int,input().split())) for i in range(3)]
a = [0]*3
b = [0]*3

a = [c[0][i] for i in range(3)]
b = [c[i][0]-a[0] for i in range(3)]

for i in range(3):
    for j in range(3):
        if a[j] + b[i] != c[i][j]:
            print("No")
            exit()

print("Yes")

Problem: p03435
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
c_table = [list(map(int, input().split())) for _ in range(3)]
a = [0]*3
b = [0]*3


for i in range(3):
    b[i] = c_table[0][i]

for i in range(3):
    a[i] = c_table[i][0]-b[0]

for i in range(3):
    for j in range(3):
        if a[i]-b[j] == c_table[i][j]:
            print('Yes')
            exit()
print('No')

Failing test case input:
2 2 0
2 1 2
2 2 2

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
c_table = [list(map(int, input().split())) for _ in range(3)]
a = [0]*3
b = [0]*3


for i in range(3):
    b[i] = c_table[0][i]

for i in range(3):
    a[i] = c_table[i][0]-b[0]

for i in range(3):
    for j in range(3):
        
        if a[i]+b[j] != c_table[i][j]:
            print('No')
            exit()
print('Yes')

Problem: p03435
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
c = [list(map(int,input().split())) for i in range(3)]
if all((c[0][i+1] - c[0][i] == c[1][i+1] - c[1][i] == c[2][i+1] - c[2][i] for i in range(1))):
    print("Yes")
else:
    print("No")

Failing test case input:
0 8 3
0 8 8
0 8 8

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
c = [list(map(int,input().split())) for i in range(3)]
if all((c[0][i+1] - c[0][i] == c[1][i+1] - c[1][i] == c[2][i+1] - c[2][i] for i in range(2))):
    print("Yes")
else:
    print("No")

Problem: p03435
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
c=[]
for _ in range(3):
  c.append( list(map(int,input().split())))

ans = True
a=[c[0][0],c[1][0],c[2][0]]
b=[c[0][0]-a[0],c[0][1]-a[0],c[0][2]-a[0]]
for i in range(3):
    for j in range(3):
        if c[i][j] != a[i]+b[j]:
            ans = False
print(ans)

Failing test case input:
4 6 3
0 1 0
1 2 2

Expected output:
No


Actual output:
False


Fixed submission (verdict: Accepted):
c=[]
for _ in range(3):
  c.append( list(map(int,input().split())))
 
ans = "Yes"
a=[c[0][0],c[1][0],c[2][0]]
b=[c[0][0]-a[0],c[0][1]-a[0],c[0][2]-a[0]]
for i in range(3):
    for j in range(3):
        if c[i][j] != a[i]+b[j]:
            ans = "No"
print(ans)
Problem: p03435
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):

(*c, ) = map(int, open(0).read().split())
print("YNeos"[sum(c) % 3 > 0::2])


Failing test case input:
2 3 2
2 1 0
1 2 2

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):

(*c, ) = map(int, open(0).read().split())
print("YNeos"[sum(c) % 3 > 0 or sum(c)

Problem: p03435
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
c_table = [list(map(int, input().split())) for _ in range(3)]
a = [0]*3
b = [0]*3


for i in range(3):
    b[i] = c_table[0][i]-0

for i in range(3):
    a[i] = c_table[0][i]-b[i]

for i in range(3):
    for j in range(3):
        if a[i]+b[j] == c_table[i][j]:
            print('Yes')
            exit()
print('No')

Failing test case input:
2 6 2
0 1 0
1 2 2

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
c_table = [list(map(int, input().split())) for _ in range(3)]
a = [0]*3
b = [0]*3


for i in range(3):
    b[i] = c_table[0][i]

for i in range(3):
    a[i] = c_table[i][0]-b[0]

for i in range(3):
    for j in range(3):
        
        if a[i]+b[j] != c_table[i][j]:
            print('No')
            exit()
print('Yes')

Problem: p03435
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
ls1 = list(map(int, input().split()))
ls2 = list(map(int, input().split()))
ls3 = list(map(int, input().split()))

ls = [ls1, ls2, ls3]
ans = 0
if ls[1][0]-ls[0][0] == ls[1][1]-ls[0][1] and ls[1][1]-ls[0][1] == ls[1][2]-ls[0][2]:
            ans += 1;
if ls[0][1]-ls[0][0] == ls[1][1]-ls[1][0] and ls[1][1] -ls [1][0] == ls[2][1]-ls[2][0]:
            ans += 1;

if ans == 2:
    print('Yes')
else:
    print('No')

   

Failing test case input:
1 0 1
2 1 2
1 0 0

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
ls1 = list(map(int, input().split()))
ls2 = list(map(int, input().split()))
ls3 = list(map(int, input().split()))

ls = [ls1, ls2, ls3]
ans = 0
if ls[1][0]-ls[0][0] == ls[1][1]-ls[0][1] and ls[1][1]-ls[0][1] == ls[1][2]-ls[0][2]:
    ans += 1 
if ls[2][0]-ls[1][0] == ls[2][1]-ls[1][1] and ls[2][1]-ls[1][1] == ls[2][2]-ls[1][2]:
    ans += 1 
if ls[0][1]-ls[0][0] == ls[1][1]-ls[1][0] and ls[1][1] -ls [1][0] == ls[2][1]-ls[2][0]:
    ans += 1 
if ls[0][2]-ls[0][1] == ls[1][2]-ls[1][1] and ls[1][2] -ls [1][1] == ls[2][2]-ls[2][1]:
    ans += 1 

if ans == 4:
    print('Yes')
else:
    print('No')
Problem: p03435
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
c=[list(map(int,input().split())) for i in range(3)]

info=True

for i in range(101):
  a1=i
  b1=c[0][0]-a1
  b2=c[0][1]-a1
  b3=c[0][2]-a1
  a2=c[1][0]-b1
  a3=c[2][0]-b1
  if min(a1,a2,a3,b1,b2,b3)<0:
    info=False
  if c[1][1]!=a2+b2:
    info=False
  if c[2][1]!=a3+b2:
    info=False
  if info:
    print("Yes")
    break
else:
  print("No")

Failing test case input:
1 0 1
2 1 2
1 0 0

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
c=[list(map(int,input().split())) for i in range(3)]


  
for i in range(101):
  info=True
  a1=i
  b1=c[0][0]-a1
  b2=c[0][1]-a1
  b3=c[0][2]-a1
  a2=c[1][0]-b1
  a3=c[2][0]-b1
  if min(a1,a2,a3,b1,b2,b3)<0:
    info=False
  if c[1][1]!=a2+b2:
    info=False
  if c[2][1]!=a3+b2:
    info=False
  if c[1][2]!=a2+b3:
    info=False
  if c[2][2]!=a3+b3:
    info=False
  
  if info:
    print("Yes")
    break
else:
  print("No")

Problem: p03435
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

c=[]
for i in range(3):
    c.append(list(map(int,input().split())))
a=[0]*3
b=[0]*3
a[0]=0
a[1]=c[1][1]-c[0][1]
a[2]=c[2][2]-c[0][2]
b[0]=c[0][0]
b[1]=c[0][1]
b[2]=c[0][2]
flag=True
for i in range(3):
    for j in range(3):
        if c[i][j]!=a[i]+b[i]:
            flag=False
if flag==True:
    print("Yes")
else:
    print("No")


Failing test case input:
1 0 1
2 1 2
1 0 1

Expected output:
Yes

Actual output:
No


Fixed submission (verdict: Accepted):

c=[]
for i in range(3):
    c.append(list(map(int,input().split())))
a=[0]*3
b=[0]*3
a[0]=0
a[1]=c[1][1]-c[0][1]
a[2]=c[2][2]-c[0][2]
b[0]=c[0][0]
b[1]=c[0][1]
b[2]=c[0][2]
flag=True
for i in range(3):
    for j in range(3):
        if c[i][j]!=a[i]+b[j]:
            flag=False
if flag==True:
    print("Yes")
else:
    print("No")

Problem: p03435
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
c=[0 for _ in range(3)]
for i in range(3):
    c[i] = list(map(int,input().split()))
for i in range(2):
    if c[i][0]-c[i+1][0] != c[i][1]-c[i+1][1] and c[i][1]-c[i+1][1] != c[i][2]-c[i+1][2] :
        print("No")
        exit()
for i in range(2):
    if c[0][i]-c[0][i+1] != c[1][i]-c[1][i+1] and c[1][i]-c[1][i+1] != c[2][i]-c[2][i+1] :
        print("No")
        exit()
print("Yes")


Failing test case input:
2 3 2
0 1 0
1 2 2

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
c=[0 for _ in range(3)]
for i in range(3):
    c[i] = list(map(int,input().split()))
for i in range(2):
    if c[i][0]-c[i+1][0] != c[i][1]-c[i+1][1] or c[i][1]-c[i+1][1] != c[i][2]-c[i+1][2] :
        print("No")
        exit()
for i in range(2):
    if c[0][i]-c[0][i+1] != c[1][i]-c[1][i+1] or c[1][i]-c[1][i+1] != c[2][i]-c[2][i+1] :
        print("No")
        exit()
print("Yes")
Problem: p03435
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c=map(int,input().split())
d,e,f=map(int,input().split())
g,h,i=map(int,input().split())
A1=-1
A2=-1
A3=-1
B1=-1
B2=-2
B3=-1
flag=0
for i in range(a+1):
    A1=i
    B1=a-A1
    B2=b-A1
    B3=c-A1
    if d-B1==e-B2 and e-B2==f-B3 and g-B1==h-B2 and h-B2 == i-B3:
        flag=1
        break
print('Yes' if flag else 'No')

Failing test case input:
0 8 8
0 8 8
0 8 8

Expected output:
Yes

Actual output:
No


Fixed submission (verdict: Accepted):
a,b,c=map(int,input().split())
d,e,f=map(int,input().split())
g,h,i=map(int,input().split())
A1=-1
A2=-1
A3=-1
B1=-1
B2=-2
B3=-1
flag=0
for j in range(a+1):
    A1=j
    B1=a-A1
    B2=b-A1
    B3=c-A1
    if B1<0 or B2<0 or B3 <0:
        continue
    A2=d-B1
    A3=g-B1
    if A2<0 or A3<0:
        continue
    if d-B1==e-B2 and e-B2==f-B3 and g-B1==h-B2 and h-B2 == i-B3:
        flag=1
        break
print('Yes' if flag else 'No')

Problem: p03435
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
c = [list(map(int, input().split())) for _ in range(3)]
b = [i - c[0][0] for i in c[0]]
a = [i[0] - c[0][0] for i in c]
if all(abs(c[i][j]-a[i]-b[j]) == c[0][0] 
        for i in range(3) for j in range(3)):
    print('Yes')
else:
    print('No')


Failing test case input:
1 0 1
4 1 2
1 0 1

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
c = [list(map(int, input().split())) for _ in range(3)]
b = [i - c[0][0] for i in c[0]]
a = [i[0] - c[0][0] for i in c]
if all(c[i][j]-a[i]-b[j] == c[0][0] 
        for i in range(3) for j in range(3)):
    print('Yes')
else:
    print('No')

Problem: p03435
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
c = [list(map(int, input().split())) for _ in range(3)]

a2 = c[1][0] - c[0][0]
a3 = c[2][0] - c[0][0]
if any(c[1][x] != a2 + c[1][x] for x in [1, 2]) or any(c[2][x] != a3 + c[1][x] for x in [0, 2]):
	print('No')
else:
	print('Yes')


Failing test case input:
2 2 2
2 1 2
2 2 2

Expected output:
No

Actual output:
Yes


Fixed submission (verdict: Accepted):
c = [list(map(int, input().split())) for _ in range(3)]

a2 = c[1][0] - c[0][0]
a3 = c[2][0] - c[0][0]

if any(c[1][x] != a2 + c[0][x] for x in [1, 2]) or any(c[2][x] != a3 + c[0][x] for x in [1, 2]):
	print('No')
else:
	print('Yes')

Problem: p03435
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
C = [list(map(int, input().split())) for i in range(3)]
a =[]
b = []
for i in range(3):
    a.append(C[1][i] - C[0][i])
for j in range(3):
    b.append(C[2][i] - C[0][i])
if a[0] == a[1] and a[1] == a[2]:
    if b[0] == b[1] and b[1] == b[2]:
        print('Yes')
    else:
        print('No')
else:
    print('No')

Failing test case input:
2 3 2
0 1 0
1 2 2

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
C = [list(map(int, input().split())) for i in range(3)]
a =[]
b = []
for i in range(3):
    a.append(C[1][i] - C[0][i])
for j in range(3):
    b.append(C[2][j] - C[0][j])
if (a[0] == a[1] and a[1] == a[2]) and (b[0] == b[1] and b[1] == b[2]):
    print('Yes')
else:
    print('No')
Problem: p03435
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
y1_list = list(map(int,input().split()))
y2_list = list(map(int,input().split()))
y3_list = list(map(int,input().split()))
 
a1 = list()
a2 = list()
 
for i in range(3):
    a1.append(y1_list[i] - y2_list[i])
    a2.append(y2_list[i] - y3_list[i])
    
if a1[0] == a1[1] and a1[2] == a1[0]:
    if a2[0] == a1[1] and a2[2] == a1[0]:
        print("Yes")
        
    else:
        print("No")
else:
    print("No")

Failing test case input:
1 0 1
2 1 2
1 0 1

Expected output:
Yes

Actual output:
No


Fixed submission (verdict: Accepted):
y1_list = list(map(int,input().split()))
y2_list = list(map(int,input().split()))
y3_list = list(map(int,input().split()))
L = [y1_list,y2_list,y3_list]
 
a1 = list()
a2 = list()
b1 = list()
b2 = list()
 
for i in range(3):
    a1.append(y1_list[i] - y2_list[i])
    a2.append(y2_list[i] - y3_list[i])
    b1.append(L[i][0] - L[i][1])
    b2.append(L[i][1] - L[i][2])
 
 
if (a1[0] == a1[1] and a1[2] == a1[0])and(b1[0] == b1[1] and b1[2] == b1[0]):
    if (a2[0] == a2[1] and a2[2] == a2[0])and(b2[0] == b2[1] and b2[2] == b2[0]):
        print("Yes")
        
    else:
        print("No")
else:
    print("No")

Problem: p03435
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
c1, c2, c3 = map(int, input().split())
c4, c5, c6 = map(int, input().split())
c7, c8, c9 = map(int, input().split())
if c4-c1==c5-c2 and c5-c2 == c6-c3 and c7-c4 ==c8-c5 and c8-c5 == c9-c6:
    if c2-c1 == c5-c4 and c5-c4 == c8-c7 and c3-c2 == c6-c5 and c6-c5 == c9-c8:
      print('Yes')
    print('No')
else:
  print('No')

Failing test case input:
1 0 1
2 1 2
1 0 1

Expected output:
Yes

Actual output:
Yes
No


Fixed submission (verdict: Accepted):
c1, c2, c3 = map(int, input().split())
c4, c5, c6 = map(int, input().split())
c7, c8, c9 = map(int, input().split())
if c4-c1==c5-c2 and c5-c2 == c6-c3 and c7-c4 ==c8-c5 and c8-c5 == c9-c6:
    if c2-c1 == c5-c4 and c5-c4 == c8-c7 and c3-c2 == c6-c5 and c6-c5 == c9-c8:
      print('Yes')
    else:print('No')
else:
  print('No')

Problem: p03435
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
c = []
for i in range(3):
  c.append(list(map(int, input().split())))

d = []
for i in range(3):
  sum = 0
  d.append([])
  for j in range(3):
    sum += c[i][j]
  for j in range(3):
    d[i].append(c[i][j] - sum/3)
    
for i in range(3):
  if d[0][i]==d[1][i] and d[0][i]==d[2][i]:
    pass
  else:
    print('No')
    break
else:
  print('Yes')


Failing test case input:
1 0 1
2 1 2
1 0 1

Expected output:
Yes

Actual output:
No


Fixed submission (verdict: Accepted):
c = []
for i in range(3):
  c.append(list(map(int, input().split())))

d = []
for i in range(3):
  sum = 0
  d.append([])
  for j in range(3):
    sum += c[i][j]
  for j in range(3):
    d[i].append(3*c[i][j] - sum)
    
for i in range(3):
  if d[0][i]==d[1][i] and d[0][i]==d[2][i]:
    pass
  else:
    print('No')
    break
else:
  print('Yes')
Problem: p03435
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a=[list(map(int,input().split())) for i in range(3)]
for i in range(2):
    for j in range(2):
        if a[i][j]-a[i][j+1]==a[i+1][j]-a[i+1][j+1]:
            continue
        else:print("NO");exit()
print("YES")   

Failing test case input:
7 0 3
2 2 3
2 -1 2

Expected output:
No


Actual output:
NO


Fixed submission (verdict: Accepted):
a=[list(map(int,input().split())) for i in range(3)]
for i in range(2):
    for j in range(2):
        if a[i][j]-a[i][j+1]==a[i+1][j]-a[i+1][j+1]:
            continue
        else:print("No");exit()
print("Yes")

Problem: p03435
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
grid = []
for i in range(3):
    grid.append([int(i) for i in input().split()])

for _ in range(100):
    a1 = i
    b1 = grid[0][0] - a1
    b2 = grid[0][1] - a1
    b3 = grid[0][2] - a1
    if  grid[1][0] - b1 == grid[1][1] - b2 == grid[1][2] - b3 and grid[2][0] - b1 == grid[2][1] - b2 == grid[2][2] - b3:
        print('Yes')
        break

print('No')


Failing test case input:
1 0 1
2 1 2
1 0 1

Expected output:
Yes

Actual output:
Yes
No


Fixed submission (verdict: Accepted):
grid = []
for i in range(3):
    grid.append([int(i) for i in input().split()])

for _ in range(100):
    a1 = i
    b1 = grid[0][0] - a1
    b2 = grid[0][1] - a1
    b3 = grid[0][2] - a1
    if  grid[1][0] - b1 == grid[1][1] - b2 == grid[1][2] - b3 and grid[2][0] - b1 == grid[2][1] - b2 == grid[2][2] - b3:
        print('Yes')
        exit()
print('No')

Problem: p03435
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A = [list(map(int,input().split())) for _ in range(3)]

ok = True
for i in range(3):
  if A[i][1] - A[i][0] == A[i][2] - A[i][1]:
    continue
  else:
    ok = False
    break

for i in range(3):
  if A[1][i] - A[0][i] == A[2][i] - A[1][i]:
    continue
  else:
    ok = False
    break
    
if not ok:
  print('No')
else:
  print('Yes')
  

  





Failing test case input:
1 0 1
2 1 2
1 0 1

Expected output:
Yes

Actual output:
No


Fixed submission (verdict: Accepted):
A = [list(map(int,input().split())) for _ in range(3)]

R1 = [A[i][1] - A[i][0] for i in range(3)]
R2 = [A[i][2] - A[i][1] for i in range(3)]
C1 = [A[1][i] - A[0][i] for i in range(3)]
C2 = [A[2][i] - A[1][i] for i in range(3)]

ok = True
for x in [R1,R2,C1,C2]:
  if len(set(x)) != 1:
    ok = False
    break
    
if not ok:
  print('No')
else:
  print('Yes')
Problem: p03435
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
if __name__ == "__main__":
    c1 = list(map(int, input().split()))
    c2 = list(map(int, input().split()))
    c3 = list(map(int, input().split()))
    sum_all = sum(c1)+sum(c2)+sum(c3)
    if sum_all%3 != 0:
        print('No')
    else:
        for a1 in range(c1[0]):
            b1 = c1[0]-a1
            b2 = c2[2]-a1
            b3 = c3[0]-a1
            if sum_all/3 - a1 - b1 - b2 - b3 < 0:
                print('No')
                break
        print('Yes')

Failing test case input:
2 3 2
2 1 0
1 2 2

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):


if __name__ == "__main__":
    c1 = list(map(int, input().split()))
    c2 = list(map(int, input().split()))
    c3 = list(map(int, input().split()))
    c = [c1, c2, c3]
    a = [0, 0, 0]
    b = [c1[0], c1[1], c1[2]]
    a[1] = c2[1] - b[1]
    a[2] = c3[1] - b[1]
    flg = True
    for i in range(3):
        for j in range(3):
            flg = flg&(a[i]+b[j] == c[i][j])
    if flg:
        print('Yes')
    else:
        print('No')

Problem: p03435
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
l=[]
for i in range(3):
  l1=list(map(int,input().split()))
  l.append(l1)
flag=0
for i in range(-1000,1000,):
  y0=l[0][0]-i
  y1=l[1][0]-i
  y2=l[2][0]-i
  x1=l[0][1]-y1
  x2=l[0][2]-y1
  if l[1][1]==y1+x1 and l[1][2]==y1+x2 and l[2][1]==y2+x1 and l[2][2]==y2+x2:
    flag=1
  else:
    continue
if flag==1:
  print('Yes')
else:
  print('No')


Failing test case input:
1 0 1
2 1 2
1 0 1

Expected output:
Yes

Actual output:
No


Fixed submission (verdict: Accepted):
l=[]
for i in range(3):
  l1=list(map(int,input().split()))
  l.append(l1)
flag=0
for i in range(-1000,1000,):
  y0=l[0][0]-i
  y1=l[1][0]-i
  y2=l[2][0]-i
  x1=l[0][1]-y0
  x2=l[0][2]-y0
  if l[1][1]==y1+x1 and l[1][2]==y1+x2 and l[2][1]==y2+x1 and l[2][2]==y2+x2:
    flag=1
  else:
    continue
if flag==1:
  print('Yes')
else:
  print('No')

Problem: p03435
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
grid = [list(map(int,input().split())) for i in range(3)]


if (grid[0][0] - grid[1][0]) == (grid[0][1] - grid[1][1]) == (grid[0][2] - grid[1][2]) and (grid[0][0]-grid[0][1]) == (grid[1][0]-grid[1][1]) == (grid[2][0] - grid[2][1]):
    print('Yes')

else:
    print('No')

Failing test case input:
1 8 6
2 9 7
0 7 7

Expected output:
No

Actual output:
Yes


Fixed submission (verdict: Accepted):
grid = [list(map(int,input().split())) for i in range(3)]


if (grid[0][0] - grid[1][0]) == (grid[0][1] - grid[1][1]) == (grid[0][2] - grid[1][2]) and (grid[0][0]-grid[0][1]) == (grid[1][0]-grid[1][1]) == (grid[2][0] - grid[2][1]) and(grid[0][0] - grid[2][0]) == (grid[0][1] - grid[2][1]) == (grid[0][2] - grid[2][2]) and  (grid[0][0]-grid[0][2]) == (grid[1][0]-grid[1][2]) == (grid[2][0] - grid[2][2]):

    print('Yes')

else:
    print('No')
Problem: p03435
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = [[int(i) for i in input().split()] for j in range(3)]

if N[0][0]-N[0][1]==N[0][1]-N[0][2] and N[1][0]-N[1][1]==N[1][1]-N[1][2] and N[2][0]-N[2][1]==N[2][1]-N[2][2] and N[0][0]-N[1][0]==N[1][0]-N[2][0] and N[0][1]-N[1][1]==N[1][1]-N[2][1] and N[0][2]-N[1][2]==N[1][2]-N[2][2]:
        print('Yes')
else:
        print('No')

Failing test case input:
0 8 8
0 8 8
0 8 8

Expected output:
Yes

Actual output:
No


Fixed submission (verdict: Accepted):
N = [[int(i) for i in input().split()] for j in range(3)]

if N[0][0]-N[0][1]==N[1][0]-N[1][1]==N[2][0]-N[2][1] and N[0][1]-N[0][2]==N[1][1]-N[1][2]==N[2][1]-N[2][2] and N[0][0]-N[1][0]==N[0][1]-N[1][1]==N[0][2]-N[1][2] and N[1][0]-N[2][0]==N[1][1]-N[2][1]==N[1][2]-N[2][2]:
        print('Yes')
else:
        print('No')

Problem: p03435
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a = [list(map(int,input().split())) for i in range(3)]

if a[0][0]+a[1][1]+a[2][2] == a[0][2]+a[1][1]+a[2][0] == a[0][1]+a[1][0]+a[2][2] == a[0][1]+a[1][2]+a[0][2]:
    print('Yes')
else:
    print('No')

Failing test case input:
0 8 8
0 8 8
0 8 8

Expected output:
Yes

Actual output:
No


Fixed submission (verdict: Accepted):
a = [list(map(int,input().split())) for i in range(3)]

if a[0][0]+a[1][1]+a[2][2] == a[0][2]+a[1][1]+a[2][0] == a[0][1]+a[1][0]+a[2][2] == a[0][1]+a[1][2]+a[2][0]==a[0][2]+a[1][0]+a[2][1] == a[0][0]+a[1][2]+a[2][1]:
    print('Yes')
else:
    print('No')

Problem: p03435
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
c=[[0 for i in range(3)] for j in range(3)]


for i in range(3):
    c[i] =list(map(int,input().split()))
    
if c[0][0]+c[1][1] == c[0][1]+c[1][0] and c[0][0]+c[2][2]==c[0][2]+c[2][0]:
    print("Yes")
else:
    print("No")

Failing test case input:
0 8 8
0 8 8
0 0 8

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
c=[[0 for i in range(3)] for j in range(3)]


for i in range(3):
    c[i] =list(map(int,input().split()))
    
if c[0][0]+c[1][1] == c[0][1]+c[1][0] and c[0][0]+c[2][2]==c[0][2]+c[2][0] and \
c[1][1]+c[2][2]==c[1][2]+c[2][1]:
    print("Yes")
else:
    print("No")

Problem: p03435
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
c = []
for _ in range(3):
  c.append(list(map(int,input().split())))
  
  
if c[0][1] - c[1][1] + c[1][0] == c[0][2] - c[1][2] + c[1][0] \
and c[0][1] - c[2][1] + c[2][0] == c[0][2] - c[2][2] + c[2][0] \
and c[1][1] - c[2][1] + c[2][0] == c[1][2] - c[2][2] + c[2][0]:
  print("Yes")
else:
  print("No")
  

Failing test case input:
1 0 1
4 1 2
1 0 1

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
c = []
for _ in range(3):
  c.append(list(map(int,input().split())))
  
ans = "Yes"
ans1 = False
ans2 = False
ans3 = False
if c[0][0] - c[1][0] == c[0][1] - c[1][1] == c[0][2] - c[1][2]:
  ans1 = True
  
if c[0][0] - c[2][0] == c[0][1] - c[2][1] == c[0][2] - c[2][2]:
  ans2 = True 
   
if c[1][0] - c[2][0] == c[1][1] - c[2][1] == c[1][2] - c[2][2]:
  ans3 = True  
  
  
if ans1 and ans2 and ans3:
  print("Yes")
  
else:
  print("No")
Problem: p03435
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys
C11,C12,C13 = map(int, input().split())
C21,C22,C23 = map(int, input().split())
C31,C32,C33 = map(int, input().split())





if (abs(C11+C22) == abs(C12 - C21)) and (abs(C12+C23) == abs(C13+C22)) and (abs(C22+C33) == abs(C23 + C32)) and (C21+C32 == C23+C32):
    print("Yes")

print("No")

Failing test case input:
1 0 1
2 1 2
1 0 1

Expected output:
Yes

Actual output:
Yes
No


Fixed submission (verdict: Accepted):
import sys
C11,C12,C13 = map(int, input().split())
C21,C22,C23 = map(int, input().split())
C31,C32,C33 = map(int, input().split())





if (C11+C22==C12+C21) and (C12+C23==C13+C22) and (C21+C32==C22+C31) and (C22+C33==C23+C32):
    print('Yes')
    sys.exit()


print("No")

Problem: p03435
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
p=list(map(int,input().split()))
q=list(map(int,input().split()))
r=list(map(int,input().split()))

ans=[]

for n in range(3):
    if p[n]<=q[n] and p[n]<=r[n]:
        ans.append(True)
    else:
        ans.append(False)

if ans[0] and ans[1] and ans[2]:
    print('Yes')
else:
    print('No')


Failing test case input:
0 8 3
0 8 8
0 8 8

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
p=list(map(int,input().split()))
q=list(map(int,input().split()))
r=list(map(int,input().split()))

ra=[p,q,r]

x=p[1]-p[0]
y=p[2]-p[0]



ans=[]

for n in range(1,3):
    if ra[n][1]-ra[n][0] == x and ra[n][2]-ra[n][0] == y:
        ans.append(True)
    else:
        ans.append(False)

if ans[0] and ans[1]:
    print('Yes')
else:
    print('No')

Problem: p03435
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
c=[]
for i in range(3):
    c.append(list(map(int,input().split())))
for i in range(2):
    if c[i+1][0]-c[i][0]==c[i+1][1]-c[i][1] and c[i+1][1]-c[i][1]==c[i+1][2]-c[i][2]:
        flg=0
    else:
        flg=1
if flg==0:
    print("Yes")
else:
    print("No")


Failing test case input:
0 8 3
0 8 8
0 8 8

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
c=[]
for i in range(3):
    c.append(list(map(int,input().split())))
for i in range(2):
    if c[i+1][0]-c[i][0]==c[i+1][1]-c[i][1] and c[i+1][1]-c[i][1]==c[i+1][2]-c[i][2] and c[0][i+1]-c[0][i]==c[1][i+1]-c[1][i] and c[1][i+1]-c[1][i]==c[2][i+1]-c[2][i]:
        flg=0
    else:
        flg=1
if flg==0:
    print("Yes")
else:
    print("No")

Problem: p03435
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
grid = []
for i in range(3):
    grid.append(list(map(int, input().split())))
flag = True
for i in range(1, 3):
    if grid[i][0] - grid[0][0] == grid[i][1] - grid[0][1] == grid[i][2] - grid[0][2]:
        continue
    else:
        flag = False
        print('No')
if flag:
    print('Yes')


Failing test case input:
2 2 -2
0 1 3
1 1 1

Expected output:
No


Actual output:
No
No


Fixed submission (verdict: Accepted):
grid = []
for i in range(3):
    grid.append(list(map(int, input().split())))
b = grid[0]
a = (0, grid[1][1]-b[1], grid[2][2]-b[2])

for i in range(3):
    for j in range(3):
        if a[i]+b[j] != grid[i][j]:
            print('No')
            exit(0)

print('Yes')
Problem: p03435
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
c = []
for _ in range(3):
    c.append(list(input().split()))
A, B, C, D, E, F, G, H, I = c[0][0], c[0][1], c[0][2], c[1][0], c[1][1], c[1][2], c[2][0], c[2][1], c[2][2]

if max(A+E+I, A+F+H, B+D+I, B+F+G, C+D+H, C+E+G) == min(A+E+I, A+F+H, B+D+I, B+F+G, C+D+H, C+E+G):
    print("Yes")
else:
    print("No")


Failing test case input:
0 8 8
0 8 8
0 8 8

Expected output:
Yes

Actual output:
No


Fixed submission (verdict: Accepted):
c = []
for _ in range(3):
    c.append(list(map(int, input().split())))
A, B, C, D, E, F, G, H, I = c[0][0], c[0][1], c[0][2], c[1][0], c[1][1], c[1][2], c[2][0], c[2][1], c[2][2]

if max(A+E+I, A+F+H, B+D+I, B+F+G, C+D+H, C+E+G) == min(A+E+I, A+F+H, B+D+I, B+F+G, C+D+H, C+E+G):
    print("Yes")
else:
    print("No")

Problem: p03435
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
c = [list(map(int,input().split())) for i in range(3)]

q1 = c[0][0] - c[0][1] == c[1][0] - c[1][1] == c[2][0] - c[2][1]
q2 = c[0][0] - c[0][2] == c[1][0] - c[1][2] == c[2][0] - c[2][2]
q3 = c[0][0] - c[1][0] == c[0][1] - c[1][1] == c[0][2] - c[1][2]
q4 = c[0][0] - c[2][0] == c[0][1] - c[2][1] == c[0][2] - c[2][2]

print("Yes" if q1 and q2 and q3 and q4 else "no")

Failing test case input:
1 0 1
0 1 5
0 0 1

Expected output:
No


Actual output:
no


Fixed submission (verdict: Accepted):
c = [list(map(int,input().split())) for i in range(3)]

q1 = c[0][0] - c[0][1] == c[1][0] - c[1][1] == c[2][0] - c[2][1]
q2 = c[0][0] - c[0][2] == c[1][0] - c[1][2] == c[2][0] - c[2][2]
q3 = c[0][0] - c[1][0] == c[0][1] - c[1][1] == c[0][2] - c[1][2]
q4 = c[0][0] - c[2][0] == c[0][1] - c[2][1] == c[0][2] - c[2][2]

print("Yes" if q1 and q2 and q3 and q4 else "No")

Problem: p03435
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a,b,c=map(int,input().split())
d,e,f=map(int,input().split())
g,h,i=map(int,input().split())
if a+e==b+d:
  if b+f==c+e:
    if d+h==e+g:
      if e+i==f+h:
        print('Yes')
print('No')

Failing test case input:
1 0 1
2 1 2
1 0 1

Expected output:
Yes

Actual output:
Yes
No


Fixed submission (verdict: Accepted):
a,b,c=map(int,input().split())
d,e,f=map(int,input().split())
g,h,i=map(int,input().split())
if a+e==b+d:
  if b+f==c+e:
    if d+h==e+g:
      if e+i==f+h:
        print('Yes')
        exit()
print('No')
Problem: p03435
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
c1 = list(map(int, input().split()))
c2 = list(map(int, input().split()))
c3 = list(map(int, input().split()))
s = [c1,c2,c3]
print(s)
s1 = s[0][0] - s[0][1] - s[1][0] + s[1][1]
s2 = s[1][1] - s[1][2] - s[2][1] + s[2][2]
if  s1== 0 and s2==0:
    if s[0][0] + s[2][2] == s[0][2] + s[2][0]:
        print('Yes')
    else:
        print('No')
else:
    print('No')


Failing test case input:
4 0 3
1 1 3
2 -1 4

Expected output:
No


Actual output:
[[4, 0, 3], [1, 1, 3], [2, -1, 4]]
No


Fixed submission (verdict: Accepted):
c1 = list(map(int, input().split()))
c2 = list(map(int, input().split()))
c3 = list(map(int, input().split()))
s = [c1,c2,c3]

s1 = s[0][0] - s[0][1] - s[1][0] + s[1][1]
s2 = s[1][1] - s[1][2] - s[2][1] + s[2][2]
if  s1== 0 and s2==0:
    if s[0][0] + s[2][2] == s[0][2] + s[2][0]:
        print('Yes')
    else:
        print('No')
else:
    print('No')

Problem: p03435
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
c = [list(map(int,input().split())) for i in range(3)]
x = c[0][0]
for i in range(x+1):
    a1 = i
    b1 = x-i
    a2 = c[1][0] - b1
    a3 = c[2][0] - b1
    b2 = c[0][1] - a1
    b3 = c[0][2] - a1
    if a2 + b2 == c[1][1] and a2 + b3 == c[1][2] and a3 + b2 == c[2][1] and a3 + b3 == c[2][2]:
        print("Yes")
    else:
        print("No")


Failing test case input:
2 3 2
2 1 -1
1 2 2

Expected output:
No


Actual output:
No
No
No


Fixed submission (verdict: Accepted):
c = [list(map(int,input().split())) for i in range(3)]
x = c[0][0]
for i in range(x+1):
    a1 = i
    b1 = x-i
    a2 = c[1][0] - b1
    a3 = c[2][0] - b1
    b2 = c[0][1] - a1
    b3 = c[0][2] - a1
    if a2 + b2 == c[1][1] and a2 + b3 == c[1][2] and a3 + b2 == c[2][1] and a3 + b3 == c[2][2]:
        print("Yes")
        exit()
print("No")

Problem: p03435
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
c = [list(map(int, input().split())) for _ in range(3)]
for i in range(3):
  if c[i][0] - c[i][1] == c[i][1] - c[i][2] == c[i][2] - c[i][0]:
    print('No')
    quit()
print('Yes')

Failing test case input:
4 6 3
0 2 2
1 0 2

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
c = [list(map(int, input().split())) for _ in range(3)]
for i in range(2):
  if not (c[i][0] - c[i + 1][0] == c[i][1] - c[i + 1][1] == c[i][2] - c[i + 1][2] and
          c[0][i] - c[0][i + 1] == c[1][i] - c[1][i + 1] == c[2][i] - c[2][i + 1]):
    print('No')
    quit()
print('Yes')
Problem: p03435
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
c1 = list(map(int, input().split()))
c2 = list(map(int, input().split()))
c3 = list(map(int, input().split()))
s = [c1,c2,c3]
print(s)
s1 = s[0][0] - s[0][1] - s[1][0] + s[1][1]
s2 = s[1][1] - s[1][2] - s[2][1] + s[2][2]
if  s1== 0 and s2==0:
    if s[0][0] + s[2][2] == s[0][2] + s[2][2]:
        print('Yes')
    else:
        print('No')
else:
    print('No')


Failing test case input:
4 9 3
0 1 3
1 0 2

Expected output:
No


Actual output:
[[4, 9, 3], [0, 1, 3], [1, 0, 2]]
No


Fixed submission (verdict: Accepted):
c1 = list(map(int, input().split()))
c2 = list(map(int, input().split()))
c3 = list(map(int, input().split()))
s = [c1,c2,c3]

s1 = s[0][0] - s[0][1] - s[1][0] + s[1][1]
s2 = s[1][1] - s[1][2] - s[2][1] + s[2][2]
if  s1== 0 and s2==0:
    if s[0][0] + s[2][2] == s[0][2] + s[2][0]:
        print('Yes')
    else:
        print('No')
else:
    print('No')

Problem: p03435
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
grid = list()
for i in range(3):
    grid.append([int(k) for k in input().split(" ")])


def check_vert():
    for i in range(2):
        diffs = [grid[k][i] - grid[k][i+1]for k in range(3)]
        print(diffs)
        if not len(set(diffs)) == 1:
            return False
    else:
        return True


def check_hor():
    for i in range(2):
        diffs = [grid[i][k] - grid[i+1][k] for k in range(3)]
        print(diffs)
        if not len(set(diffs)) == 1:
            return False
    else:
        return True


if check_hor() and check_vert():
    print("Yes")
else:
    print("No")

Failing test case input:
7 0 3
2 1 3
2 -1 5

Expected output:
No


Actual output:
[5, -1, 0]
No


Fixed submission (verdict: Accepted):
grid = list()
for i in range(3):
    grid.append([int(k) for k in input().split(" ")])


def check_vert():
    for i in range(2):
        diffs = [grid[k][i] - grid[k][i+1]for k in range(3)]
        if not len(set(diffs)) == 1:
            return False
    else:
        return True


def check_hor():
    for i in range(2):
        diffs = [grid[i][k] - grid[i+1][k] for k in range(3)]
        if not len(set(diffs)) == 1:
            return False
    else:
        return True


if check_hor() and check_vert():
    print("Yes")
else:
    print("No")

Problem: p03435
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a = [list(map(int,input().split())) for i in range(3)]
if a[0][0]-a[1][0] == a[0][1]-a[1][1] == a[0][2]-a[1][2] and a[1][0]-a[2][0] == a[1][1]-a[2][1] == a[1][2] == a[2][2]:
  print("Yes")
else:
  print("No")

Failing test case input:
1 0 1
2 1 2
1 0 1

Expected output:
Yes

Actual output:
No


Fixed submission (verdict: Accepted):
a = [list(map(int,input().split())) for i in range(3)]
if a[0][0]-a[1][0] == a[0][1]-a[1][1] == a[0][2]-a[1][2] and a[1][0]-a[2][0] == a[1][1]-a[2][1] == a[1][2]-a[2][2]:
  print("Yes")
else:
  print("No")