We have a 3 \times 3 grid. A number c_{i, j} is written in the square (i, j), where (i, j) denotes the square at the i-th row from the top and the j-th column from the left.

According to Takahashi, there are six integers a_1, a_2, a_3, b_1, b_2, b_3 whose values are fixed, and the number written in the square (i, j) is equal to a_i + b_j.

Determine if he is correct.  

-----Constraints-----
 - c_{i, j} \ (1 \leq i \leq 3, 1 \leq j \leq 3) is an integer between 0 and 100 (inclusive).

-----Input-----
Input is given from Standard Input in the following format:
c_{1,1} c_{1,2} c_{1,3}
c_{2,1} c_{2,2} c_{2,3}
c_{3,1} c_{3,2} c_{3,3}

-----Output-----
If Takahashi's statement is correct, print Yes; otherwise, print No.

-----Sample Input-----
1 0 1
2 1 2
1 0 1

-----Sample Output-----
Yes

Takahashi is correct, since there are possible sets of integers such as: a_1=0,a_2=1,a_3=0,b_1=1,b_2=0,b_3=1.
[{"code": "#!/usr/bin/env python3\n\nc = [list(map(int, input().split())) for i in range(3)]\n\n\na1 = 0\nb1, b2, b3 = c[0][0], c[0][1], c[0][2]\na2 = c[1][0]-b1\na3 = c[2][0]-b1\n\ncheck = []\ncheck.append(c[1][1] == a2+b2)\ncheck.append(c[2][1] == a3+b2)\ncheck.append(c[1][2] == a2+b3)\ncheck.append(c[2][2] == a3+b3)\n\nif sum(check) == 4:\n    print(\"Yes\")\nelse:\n    print(\"No\")\n", "passed": true, "time": 0.2, "memory": 14144.0, "status": "done"}, {"code": "c11, c12, c13 = map(int, input().split())\nc21, c22, c23 = map(int, input().split())\nc31, c32, c33 = map(int, input().split())\n\nif c21-c11==c22-c12==c23-c13 and c31-c21==c32-c22==c33-c23 and c12-c11==c22-c21==c32-c31 and c13-c12==c23-c22==c33-c32:\n    print(\"Yes\")\nelse:\n    print(\"No\")", "passed": true, "time": 0.26, "memory": 14220.0, "status": "done"}, {"code": "A1 = 0\nB1, B2, B3 = map(int, input().split())\nC1, C2, C3 = map(int, input().split())\nD1, D2, D3 = map(int, input().split())\nflag = 0\nif not( C2-B2 == C1-B1 and C3-B3 == C1-B1 and C2-B2 == C3-B3):\n    flag = 1\nif not( D2-B2 == D1-B1 and D3-B3 == D1-B1 and D2-B2 == D3-B3):\n    flag = 1\nprint(\"Yes\" if flag == 0 else \"No\")", "passed": true, "time": 0.15, "memory": 14256.0, "status": "done"}, {"code": "C=[list(map(int,input().split())) for i in range(3)]\nBs=[C[0][i] for i in range(3)]\nAs=[0,C[1][0]-Bs[0],C[2][0]-Bs[0]]\nif all(As[i]+Bs[j]==C[i][j] for i in range(3) for j in range(3)):\n    print(\"Yes\")\nelse:\n    print(\"No\")", "passed": true, "time": 0.17, "memory": 14224.0, "status": "done"}, {"code": "c = []\nfor i in range(3):\n    c.append(list(map(int, input().split())))\n\nans = True\nfor i in range(2):\n    tmp = c[0][i + 1] - c[0][i]\n    for j in range(2):\n        if c[j + 1][i + 1] - c[j + 1][i] != tmp:\n            ans = False\n            break\n\nfor i in range(2):\n    tmp = c[i + 1][0] - c[i][0]\n    for j in range(2):\n        if c[i + 1][j + 1] - c[i][j + 1] != tmp:\n            ans = False\n            break\n\nif ans:\n    print(\"Yes\")\nelse:\n    print(\"No\")\n", "passed": true, "time": 0.15, "memory": 14120.0, "status": "done"}, {"code": "a,b,c = map(int,input().split())\nd,e,f = map(int,input().split())\ng,h,i = map(int,input().split())\n\nif a+e+i == b+f+g == c+d+h == a+f+h == c+e+g == b+d+i:\n  print(\"Yes\")\nelse:\n  print(\"No\")", "passed": true, "time": 0.14, "memory": 14356.0, "status": "done"}, {"code": "c = [list(map(int, input().split())) for _ in range(3)]\nA1 = c[1][0] - c[0][0]\nA2 = c[2][0] - c[1][0]\nB1 = c[0][1] - c[0][0]\nB2 = c[0][2] - c[0][1]\nif c[1][1] == A1 + B1 + c[0][0] and c[1][2] == A1 + B1 + B2 + c[0][0] and c[2][1] == A1 + A2 + B1 + c[0][0] and c[2][2] == A1 + A2 + B1 + B2 + c[0][0]:\n    print(\"Yes\")\nelse:\n    print(\"No\")", "passed": true, "time": 0.15, "memory": 14260.0, "status": "done"}, {"code": "c = [list(map(int, input().split())) for _ in range(3)]\n\nif sum([sum(i) for i in c]) % 3 != 0:\n    print(\"No\")\nelse:\n    a0 = 0\n    b0, b1, b2 = c[0][0], c[0][1], c[0][2]\n    a1, a2 = c[1][0] - b0, c[2][0] - b0\n    if c[1][1] == a1 + b1 and c[1][2] == a1 + b2 and c[2][1] == a2 + b1 and c[2][2] == a2 + b2:\n        print(\"Yes\")\n    else:\n        print(\"No\")\n", "passed": true, "time": 0.15, "memory": 14136.0, "status": "done"}, {"code": "def LIHW(h):\n    return [list(map(int, input().split())) for _ in range(h)]\n \n \nmasu = LIHW(3)\nans = \"Yes\"\nfor i in range(2):\n    if masu[i+1][1]-masu[i+1][0] != masu[0][1]-masu[0][0]:\n        ans = \"No\"\n    if masu[i+1][2]-masu[i+1][1] != masu[0][2]-masu[0][1]:\n        ans = \"No\"\nfor i in range(2):\n    if masu[1][i+1]-masu[0][i+1] != masu[1][0]-masu[0][0]:\n        ans = \"No\"\n    if masu[2][i+1]-masu[1][i+1] != masu[2][0]-masu[1][0]:\n        ans = \"No\"\nprint(ans)", "passed": true, "time": 0.14, "memory": 14116.0, "status": "done"}, {"code": "c=[]\nfor _ in range(3):\n    c.append(list(map(int,input().split())))\n\ns=0\nfor i in range (3):\n    for j in range(3):\n        if i==j:\n            s+=c[i][j]*2\n        else:s-=c[i][j]\n\nif s==0:print(\"Yes\")\nelse:print(\"No\")\n", "passed": true, "time": 0.14, "memory": 14288.0, "status": "done"}, {"code": "c=[list(map(int,input().split())) for i in range(3)]\nif (c[0][0]+c[1][1]+c[2][2])*2==c[0][1]+c[0][2]+c[1][0]+c[1][2]+c[2][0]+c[2][1]:\n  print('Yes')\nelse:\n  print('No')\n", "passed": true, "time": 0.15, "memory": 14344.0, "status": "done"}, {"code": "r1 = list(map(int, input().split()))\nr2 = list(map(int, input().split()))\nr3 = list(map(int, input().split()))\na = [0]*3\nb = [0]*3\nfor i in range(101):\n  a[0] = i\n  for j in range(3):\n    b[j] = r1[j]-a[0]\n    \n  a[1] = r2[0] - b[0]\n  a[2] = r3[0] - b[0]\n\n  flag = False\n  for j in range(3):\n    if r1[j]==a[0]+b[j] and r2[j]==a[1]+b[j] and r3[j] == a[2]+b[j]:\n      flag = True\n    else:\n      flag = False\n      break\n  if flag:\n    break\n    \nprint(\"Yes\") if flag else print(\"No\")", "passed": true, "time": 1.65, "memory": 14132.0, "status": "done"}, {"code": "x=list(map(int, input().split()))\ny=list(map(int, input().split()))\nz=list(map(int, input().split()))\nif x[1]-x[0] != y[1]-y[0] or y[1]-y[0] != z[1]-z[0] or x[2]-x[0] != y[2]-y[0] or y[0]-x[0] !=y[1]-x[1] or z[1]-x[1] !=z[2]-x[2] or z[0]-x[0] !=z[1]-x[1] or z[1]-x[1] !=z[2]-x[2] :\n    print('No')\nelse:\n    print('Yes')", "passed": true, "time": 0.15, "memory": 14100.0, "status": "done"}, {"code": "def is_valid(m, a, b):\n    for i in range(3):\n        for j in range(3):\n            if (m[i][j] != a[i] + b[j]):\n                return 0\n    return 1\n\n\nm = []\nfor a0 in range(3):\n    m.append(list(map(int, input().split())))\n\nfor a0 in range(101):\n    b0 = m[0][0] - a0\n    b1 = m[0][1] - a0\n    b2 = m[0][2] - a0\n    a1 = m[1][0] - b0\n    a2 = m[2][0] - b0\n    if (is_valid(m, [a0, a1, a2], [b0, b1, b2])):\n        print(\"Yes\")\n        return\nprint(\"No\")\n", "passed": true, "time": 0.15, "memory": 14236.0, "status": "done"}, {"code": "List=[list(map(int,input().split())) for i in range(3)]\nnewlist=[]\nnew = [x-y for (x,y) in zip(List[0],List[1])]\nnew2 = [x-y for (x,y) in zip(List[2],List[1])]\nif new[0]==new[1] and new[1]==new[2]:\n    pass\nelse:\n    print('No')\n    return\nif new2[0]==new2[1] and new2[1]==new2[2]:\n    pass\nelse:\n    print('No')\n    return\n    \nif List[0][0]-List[0][1]==List[1][0]-List[1][1] and List[2][0]-List[2][1]==List[1][0]-List[1][1]:\n    pass\nelse:\n    print('No')\n    return\nif List[0][0]-List[0][2]==List[1][0]-List[1][2] and List[2][0]-List[2][2]==List[1][0]-List[1][2]:\n    pass\nelse:\n    print('No')\n    return\nprint('Yes')", "passed": true, "time": 0.14, "memory": 14164.0, "status": "done"}, {"code": "a,b,c = map(int,input().split())\nd,e,f = map(int,input().split())\ng,h,i = map(int,input().split())\n \nif a+e+i == b+f+g == c+d+h:\n  print(\"Yes\")\nelse:\n  print(\"No\")", "passed": true, "time": 0.14, "memory": 14324.0, "status": "done"}, {"code": "c = [list(map(int, input().split())) for _ in range(3)]\n\nfor i in range(1, 3):\n    d = c[i][0] - c[0][0]\n    e = c[0][i] - c[0][0]\n    for j in range(1, 3):\n        if d != c[i][j] - c[0][j]:\n            print(\"No\")\n            return\n        if e != c[j][i] - c[j][0]:\n            print(\"No\")\n            return\nprint(\"Yes\")", "passed": true, "time": 0.14, "memory": 14156.0, "status": "done"}, {"code": "c11 ,c12, c13 = map(int,input().split())\nc21 ,c22, c23 = map(int,input().split())\nc31 ,c32, c33 = map(int,input().split())\n\nif c11 - c12 == c21 -c22 == c31-c32 and c12 - c13 == c22 -c23 == c32-c33 and c11 - c21 == c12 -c22 == c13-c23 and c21 - c31 == c22 -c32 == c23-c33 :\n    print('Yes')\nelse :\n    print('No')", "passed": true, "time": 0.14, "memory": 14252.0, "status": "done"}, {"code": "clst=list(map(int,input().split()))\ndif=[x-clst[0] for x in clst]\nclst=list(map(int,input().split()))\nif not [clst[0]+x for x in dif]==clst : print(\"No\");return\nclst=list(map(int,input().split()))\nif not [clst[0]+x for x in dif]==clst : print(\"No\");return\nprint(\"Yes\")", "passed": true, "time": 0.14, "memory": 14088.0, "status": "done"}, {"code": "a=[list(map(int,input().split())) for _ in range(3)]\nb=list(zip(*a))\nc=a[0]\nd=b[0]\nf=True\n\ndx1=c[1]-c[0]\ndx2=c[2]-c[1]\ndy1=d[1]-d[0]\ndy2=d[2]-d[1]\n\nfor i in range(3):\n  c=a[i]\n  d=b[i]\n  if dx1==c[1]-c[0] and dx2==c[2]-c[1] and dy1==d[1]-d[0] and dy2==d[2]-d[1]:\n    f=True\n  else:\n    f=False\n    break\nif f:\n  print('Yes')\nelse:\n  print('No')", "passed": true, "time": 0.14, "memory": 14248.0, "status": "done"}, {"code": "c11,c12,c13=list(map(int, input().split()))\nc21,c22,c23=list(map(int, input().split()))\nc31,c32,c33=list(map(int, input().split()))\n\nans=\"No\"\nfor a1 in range(c11+1):\n    \n    b1=c11-a1\n    b2=c12-a1\n    b3=c13-a1\n    a2=c21-b1\n    a3=c31-b1\n\n    if c22==a2+b2 and c23==a2+b3 and c32==a3+b2 and c33==a3+b3:\n        ans=\"Yes\"\n        break\n\nprint(ans)\n", "passed": true, "time": 0.14, "memory": 14072.0, "status": "done"}, {"code": "c=[list(map(int,input().split())) for _ in range(3)]\nfor i in range(2):\n    if not (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]):\n        print(\"No\")\n        break\n    if not (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]):\n        print(\"No\")\n        break\nelse:\n    print(\"Yes\")\n", "passed": true, "time": 0.15, "memory": 14140.0, "status": "done"}, {"code": "C = [list(map(int, input().split())) for _ in range(3)]\nx = [0, 0, 0]\ny = [0, 0, 0]\n\nfor i in range(3):\n    y[i] = C[0][i]\nfor i in range(3):\n    x[i] = C[i][0] - y[0]\nfor i in range(3):\n    for j in range(3):\n        if C[i][j] != x[i] + y[j]:\n            print('No')\n            return\nprint('Yes')", "passed": true, "time": 0.14, "memory": 14168.0, "status": "done"}, {"code": "c = [list(map(int, input().split())) for _ in range(3)]\n\na = [0, 0, 0]\nb = [0, 0, 0]\n\ndef check(c, a, b):\n    for i in range(3):\n        for j in range(3):\n            if a[i] + b[j] != c[i][j]:\n                return False\n    return True\n\nfor i in range(101):\n    b[0] = i\n    a[0] = c[0][0] - b[0]\n    a[1] = c[1][0] - b[0]\n    a[2] = c[2][0] - b[0]\n    b[1] = c[0][1] - a[0]\n    b[2] = c[0][2] - a[0]\n\n    if check(c, a, b):\n        print(\"Yes\")\n        return\n\nprint(\"No\")\n", "passed": true, "time": 0.14, "memory": 14352.0, "status": "done"}, {"code": "# -*- coding: utf-8 -*-\n\nc = [list(map(int, input().split())) for _ in range(3)]\n\na = [0] * 3\nb = [0] * 3\n\nfor j in range(3):\n    b[j] = c[0][j] - a[0]\n\nfor i in range(1,3,1):\n    a[i] = c[i][0] - b[0]\n\nfor i in range(3):\n    for j in range(3):\n        if c[i][j] != a[i] + b[j]:\n            print(\"No\")\n            return\n\nprint(\"Yes\")\n", "passed": true, "time": 0.14, "memory": 14096.0, "status": "done"}, {"code": "c = [0] * 3\nfor i in range(3):\n    c[i] = list(map(int, input().split()))\n\nif c[2][1] - c[2][0] == c[0][1] - c[0][0] and c[0][2] - c[1][2] == c[0][0] - c[1][0] and c[1][2] - c[2][2] == c[1][0] - c[2][0] and c[0][2] - c[2][2] == c[0][0] - c[2][0] and c[1][1] - c[0][1] == c[1][0] - c[0][0]:\n    print(\"Yes\")\nelse:\n    print(\"No\")", "passed": true, "time": 0.34, "memory": 14288.0, "status": "done"}, {"code": "c = [list(map(int,input().split())) for _ in range(3)]\na = [0]*3\nb = [0]*3\nok = True\n\nb = c[0]\n\na[1] = c[1][0]-b[0]\na[2] = c[2][0]-b[0]\n\nfor i in range(3):\n    for j in range(3):\n        if c[i][j]!=a[i]+b[j]:\n            ok = False\n        \nif ok:\n    print('Yes')\nelse:\n    print('No')\n", "passed": true, "time": 0.21, "memory": 14136.0, "status": "done"}, {"code": "c = [list(map(int, input().split())) for _ in range(3)]\nans = \"Yes\"\nfor i in range(1,3):\n    if c[i][0]-c[0][0] != c[i][1]-c[0][1] or c[i][1]-c[0][1] != c[i][2]-c[0][2]:\n        ans = \"No\"\nprint(ans)", "passed": true, "time": 0.15, "memory": 14152.0, "status": "done"}, {"code": "ans = 'Yes'\nc = []\nfor _ in range(3):\n  c.append(list(map(int, input().split())))\nadiff = []\nbdiff = []\nfor i in range(2):\n  adiff.append(c[i+1][0] - c[i][0])\n  bdiff.append(c[0][i+1] - c[0][i])\nfor i in range(1, 3):\n  for j in range(1, 3):\n    if adiff[i-1] != c[i][j] - c[i-1][j] or bdiff[j-1] != c[i][j] - c[i][j-1]:\n      ans = 'No'\n      break\nprint(ans)\n", "passed": true, "time": 0.15, "memory": 14216.0, "status": "done"}, {"code": "a,b,c=[list(map(int,input().split())) for i in range(3)]\nprint(\"Yes\" if (a[0]-a[1],a[1]-a[2],a[0]-a[1])==(b[0]-b[1],b[1]-b[2],b[0]-b[1])==(c[0]-c[1],c[1]-c[2],c[0]-c[1]) else \"No\")", "passed": true, "time": 0.24, "memory": 14272.0, "status": "done"}, {"code": "c = [list(map(int,input().split())) for i in range(3)]\nx = [0] * 3\ny = [0] * 3\nfor i in range(3):\n    y[i] = c[0][i] - x[0]\nfor i in range(3):\n    x[i] = c[i][0] - y[0]\n\nflag = True\nfor i in range(3):\n    for j in range(3):\n        if x[i] + y[j] != c[i][j]:\n            flag = False\nif flag:\n    print(\"Yes\")\nelse:\n    print(\"No\")", "passed": true, "time": 0.15, "memory": 14100.0, "status": "done"}, {"code": "c = [list(map(int, input().split())) for _ in range(3)]\nfor i in [1, 2]:\n  d1 = c[0][0] - c[i][0]\n  d2 = c[0][1] - c[i][1]\n  d3 = c[0][2] - c[i][2]\n  d4 = c[0][0] - c[0][i]\n  d5 = c[1][0] - c[1][i]\n  d6 = c[2][0] - c[2][i]\n  if d1 != d2 or d1 != d3 or d4 != d5 or d4 != d6:\n    print(\"No\")\n    return\nprint(\"Yes\")", "passed": true, "time": 0.28, "memory": 14224.0, "status": "done"}, {"code": "arr = []\n\nfor _ in range(3):\n    arr += list(map(int, input().split()))\n\na = [0] * 3\nb = [0] * 3\na[0] = 0\nb[0] = arr[0]\nb[1] = arr[1]\nb[2] = arr[2]\na[1] = arr[4] - b[1]\na[2] = arr[8] - b[2]\n\ntmp = [a[i] + b[j] for i in range(3) for j in range(3)]\n\nprint('Yes' if arr == tmp else 'No')", "passed": true, "time": 2.01, "memory": 14164.0, "status": "done"}, {"code": "field=[]\nresult=\"Yes\"\nfor i in range(3):\n  field.append(list(map(int,input().split())))\nfor i in range(3):\n  for j in range(3):\n    if not (field[i][j]>=0 and field[i][j]<=100*2):\n      result=\"No\"\n    if j ==0:\n      pos_i0=field[i][j]\n    field[i][j]-=pos_i0\nfor j in range(3):\n  if not (field[0][j]==field[1][j] and field[0][j]==field[2][j]):\n    result=\"No\"\nprint(result)", "passed": true, "time": 0.2, "memory": 14272.0, "status": "done"}, {"code": "def main():\n    c1 = list(map(int, input().split()))\n    c2 = list(map(int, input().split()))\n    c3 = list(map(int, input().split()))\n    for i in range(0, 101):\n        for j in range(0, 101):\n            for k in range(0, 101):\n                flag = True\n                b = []\n                for l in range(3):\n                    b.append(c3[l] - k)\n                for l in range(3):\n                    if j+b[l] != c2[l]:\n                        flag = False\n                        break\n                for l in range(3):\n                    if i+b[l] != c1[l]:\n                        flag = False\n                        break\n                if flag:\n                    print('Yes')\n                    return\n\n    print('No')\n\ndef __starting_point():\n    main()\n\n__starting_point()", "passed": true, "time": 2.03, "memory": 14200.0, "status": "done"}, {"code": "# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Tue Sep 22 04:07:05 2020\n\n@author: liang\n\"\"\"\n\nC = [[int (x) for x in input().split()] for _ in range(3)]\nA = [0]*3\nB = [0]*3\n\nans = False\nfor a1 in range(C[0][0]+1):\n    tmp = True\n    b1 = C[0][0] - a1\n    b2 = C[0][1] - a1\n    b3 = C[0][2] - a1\n    a2 = C[1][0] - b1\n    a3 = C[2][0] - b1\n    if C[1][1] != a2+b2:\n        tmp = False\n    if C[1][2] != a2+b3:\n        tmp = False\n    if C[2][1] != a3+b2:\n        tmp = False\n    if C[2][2] != a3+b3:\n        tmp = False\n    if tmp == True:\n        ans = True\nif ans:\n    print(\"Yes\")\nelse:\n    print(\"No\")", "passed": true, "time": 0.29, "memory": 14212.0, "status": "done"}, {"code": "# coding: utf-8\n\n\ndef main():\n    ans = 'No'\n    c = [list(map(int, input().split())) for _ in range(3)]\n    for i in range(101):\n        for j in range(101):\n            for k in range(101):\n                flgs = [False, False, False]\n                if c[0][0] - i == c[1][0] - j and c[0][0] - i == c[2][0] - k: flgs[0] = True\n                if c[0][1] - i == c[1][1] - j and c[0][1] - i == c[2][1] - k: flgs[1] = True\n                if c[0][2] - i == c[1][2] - j and c[0][2] - i == c[2][2] - k: flgs[2] = True\n                if (all(flgs)): ans = 'Yes'\n\n    print(ans)\n\ndef __starting_point():\n    main()\n\n__starting_point()", "passed": true, "time": 2.0, "memory": 14244.0, "status": "done"}, {"code": "from sys import stdin, stdout # only need for big input\n\n\ndef solve():\n    c1 = list(map(int, input().split()))\n    c2 = list(map(int, input().split()))\n    c3 = list(map(int, input().split()))\n    b = c1\n    a2 = [c2[i] - b[i] for i in range(3)]\n    a3 = [c3[i] - b[i] for i in range(3)]\n    if max(a2) == min(a2) and max(a3) == min(a3):\n        print(\"Yes\")\n    else:\n        print(\"No\")\n\ndef main():\n    solve()\n\n\ndef __starting_point():\n    main()\n__starting_point()", "passed": true, "time": 0.18, "memory": 14320.0, "status": "done"}, {"code": "c = [list(map(int,input().split())) for _ in range(3)]\n\ncheck = False\nfor i in range(101):\n  for j in range(101):\n    for k in range(101):\n      o = c[0][0] - i\n      p = c[1][1] - j\n      q = c[2][2] - k\n      \n      if o < 0 or p < 0 or q < 0:\n        continue\n      \n      ls = [[i+o,i+p,i+q],[j+o,j+p,j+q],[k+o,k+p,k+q]]\n      if ls == c:\n        check = True\n        break\n        \nprint(\"Yes\" if check else \"No\")", "passed": true, "time": 0.89, "memory": 14136.0, "status": "done"}, {"code": "def main():\n  c=[list(map(int,input().split())) for _ in [0,0,0]]\n  for j in [2,1,0]:\n    if c[j][0]-c[j-1][0]==c[j][1]-c[j-1][1]==c[j][2]-c[j-1][2]:\n      continue\n    if c[0][j]-c[0][j-1]==c[1][j]-c[1][j-1]==c[2][j]-c[2][j-1]:\n      continue\n    print(\"No\")\n    return\n  print(\"Yes\")\n  return\nmain()", "passed": true, "time": 0.18, "memory": 14028.0, "status": "done"}, {"code": "List = []\nfor i in range (3):\n  List.append(list(map(int, input().split())))\na = 0\nb = 0\nc = 0\nflg = True\nfor i in range(2):\n  a = List[0][i+1] - List[0][i]\n  b = List[1][i+1] - List[1][i]\n  c = List[2][i+1] - List[2][i]\n  if a != b or b != c or c != a:\n    flg = False\n  a = List[i+1][0] - List[i][0]\n  b = List[i+1][1] - List[i][1]\n  c = List[i+1][2] - List[i][2]\n  if a != b or b != c or c != a:\n    flg = False\nif flg:\n  print(\"Yes\")\nelse:\n  print(\"No\")", "passed": true, "time": 0.17, "memory": 14160.0, "status": "done"}, {"code": "A=[list(map(int,input().split())) for i  in range(3)]\nif A[0][0]+A[1][1]==A[0][1]+A[1][0] and A[1][1]+A[2][2]==A[1][2]+A[2][1] and A[0][0]+A[2][2]==A[0][2]+A[2][0] :\n    print(\"Yes\")\nelse:\n    print(\"No\")", "passed": true, "time": 0.22, "memory": 14104.0, "status": "done"}, {"code": "c = []\nfor _ in range(3):\n  c.append(list(map(int, input().split())))\nif c[0][1]-c[0][0] == c[1][1]-c[1][0] and c[2][1]-c[2][0] == c[1][1]-c[1][0] and c[0][2]-c[0][1] == c[1][2]-c[1][1] and c[2][2]-c[2][1] == c[1][2]-c[1][1]:\n  print(\"Yes\")\nelse:\n  print(\"No\")", "passed": true, "time": 0.18, "memory": 14140.0, "status": "done"}, {"code": "L = [list(map(int, input().split())) for _ in range(3)]\nT = sum([sum(i) for i in L])\nprint('Yes' if L[0][0] + L[1][1] + L[2][2] == (T / 3) else 'No')", "passed": true, "time": 0.14, "memory": 14084.0, "status": "done"}, {"code": "c=[list(map(int,input().split())) for _ in range(3)]\n\nans = \"Yes\"\n\nfor i in range(2):\n    if c[i+1][1]-c[i+1][0] != c[0][1]-c[0][0]:\n        ans = \"No\"\n    if c[i+1][2]-c[i+1][1] != c[0][2]-c[0][1]:\n        ans = \"No\"\nfor j in range(2):\n    if c[1][i+1]-c[0][i+1] != c[1][0]-c[0][0]:\n        ans = \"No\"\n    if c[2][i+1]-c[1][i+1] != c[2][0]-c[1][0]:\n        ans = \"No\"\n\nprint(ans)", "passed": true, "time": 0.15, "memory": 14128.0, "status": "done"}, {"code": "c = [list(map(int, input().split())) for _ in range(3)]\n# a2 + b1 = c21\n# a2 + b2 = c22\n# a2 + b3 = c23\nb1, b2, b3 = c[0][0], c[0][1], c[0][2]\n\nif c[1][0] - b1 == c[1][1] - b2 == c[1][2] - b3 and c[2][0] - b1 == c[2][1] - b2 == c[2][2] - b3:\n    print('Yes')\nelse:\n    print('No')\n", "passed": true, "time": 0.15, "memory": 14304.0, "status": "done"}, {"code": "c1 = list(map(int, input().split()))\nc2 = list(map(int, input().split()))\nc3 = list(map(int, input().split()))\nc = [c1,c2,c3]\nfor a1 in range(100):\n    b1 = c1[0] - a1\n    b2 = c1[1] - a1\n    b3 = c1[2] - a1\n    a21 = c2[0] - b1\n    a22 = c2[1] - b2\n    a23 = c2[2] - b3\n    a31 = c3[0] - b1\n    a32 = c3[1] - b2\n    a33 = c3[2] - b3\n#     print('a1',a1)\n#     print('a2',a21,a22,a23)\n#     print('a3',a31,a32,a33)\n#     print('b',b1,b2,b3)\n    if (a21 == a22 == a23) and (a31 == a32 == a33):\n        print('Yes')\n        break\n    elif a1 == 99:\n        print('No')\n        break\n    else:\n        continue", "passed": true, "time": 0.14, "memory": 14344.0, "status": "done"}, {"code": "c=[list(map(int,input().split())) for _ in range(3)]\n\nans = \"Yes\"\nfor i in range(2):\n    # print(\"i =\",i)\n    if c[0][i] - c[0][i+1] != c[1][i] - c[1][i+1]:\n        # print(\"check1\")\n        # print(c[0][i], \"-\", c[0][i+1], \"!=\", c[1][i], \"-\", c[1][i+1])\n        ans = \"No\"\n    elif c[1][i] - c[1][i+1] != c[2][i] - c[2][i+1]:\n        # print(\"check2\")\n        # print(c[1][i], \"-\", c[1][i+1], \"!=\", c[2][i], \"-\", c[2][i+1])\n        ans = \"No\"\n    elif c[i][0] - c[i+1][0] != c[i][1] - c[i+1][1]:\n        # print(\"check3\")\n        # print(c[i][0], \"-\", c[i+1][0], \"!=\", c[i+1][1], \"-\", c[i+1][1])\n        ans = \"No\"\n    elif c[i][1] - c[i+1][1] != c[i][2] - c[i+1][2]:\n        # print(\"check4\")\n        # print(c[i][1], \"-\", c[i+1][1], \"!=\", c[i+1][2], \"-\", c[i+1][2])\n        ans = \"No\"\nprint(ans)", "passed": true, "time": 0.14, "memory": 14136.0, "status": "done"}, {"code": "l = []\nfor i in range(3):\n    c1,c2,c3 = map(int, input().split())\n    l.append([c1,c2,c3])\n\n# assign a1 as 0\nb1 = l[0][0]\nb2 = l[1][0]\nb3 = l[2][0]\n\nflag = 0\nfor i in range(3):\n    if not (l[0][1]-b1 == l[1][1]-b2 == l[2][1]-b3):\n        flag = 1\n    if not (l[0][2]-b1 == l[1][2]-b2 == l[2][2]-b3):\n        flag = 1\nif flag == 1:\n    print('No' , flush=True)\nelse:\n    print('Yes' , flush=True)\n\n# TLE\n# l = []\n# for i in range(3):\n#     c1,c2,c3 = map(int, input().split())\n#     l.append([c1,c2,c3])\n\n# def check_sum(i,j):\n#     for r in range(3):\n#         if r == i:\n#             continue;\n#         for c in range(3):\n#             if c == j:\n#                 continue;\n#             sum_a = l[i][j] + l[r][c]\n#             sum_b = l[r][j] + l[i][c]\n#             if sum_a == sum_b:\n#                 return 1\n#             else:\n#                 return -1\n#                 break;\n\n# for i in range(3):\n#     for j in range(3):\n#         flag = check_sum(i, j)\n#         if flag == -1:\n#             break;\n\n# if flag == 1:\n#     print('Yes' , flush=True)\n# else:\n#     print('No' , flush=True)\n", "passed": true, "time": 0.14, "memory": 14288.0, "status": "done"}, {"code": "c1 = list(map(int, input().split()))\nc2 = list(map(int, input().split()))\nc3 = list(map(int, input().split()))\n\nf = 0\nfor a1 in range(min(c1)+1):\n    b1 = c1[0]-a1\n    b2 = c1[1]-a1\n    b3 = c1[2]-a1\n\n    a2_1 = c2[0]-b1\n    a2_2 = c2[1]-b2\n    a2_3 = c2[2]-b3\n    if not (a2_1==a2_2 and a2_2==a2_3):\n        continue\n\n    a3_1 = c3[0]-b1\n    a3_2 = c3[1]-b2\n    a3_3 = c3[2]-b3\n    if not (a3_1==a3_2 and a3_2==a3_3):\n        continue\n\n    print(\"Yes\")\n    f=1\n    break\n\nif not f:\n    print(\"No\")", "passed": true, "time": 0.14, "memory": 14112.0, "status": "done"}, {"code": "c_1_1, c_1_2, c_1_3 = map(int, input().split())\nc_2_1, c_2_2, c_2_3 = map(int, input().split())\nc_3_1, c_3_2, c_3_3 = map(int, input().split())\n\nans = \"No\"\nfor a_1 in range(101):\n  b_1 = c_1_1 - a_1\n  b_2 = c_1_2 - a_1\n  b_3 = c_1_3 - a_1\n  for a_2 in range(101):\n    if c_2_1 != a_2 + b_1:\n      continue\n    if c_2_2 != a_2 + b_2:\n      continue\n    if c_2_3 != a_2 + b_3:\n      continue\n    for a_3 in range(101):\n      if c_3_1 != a_3 + b_1:\n        continue\n      if c_3_2 != a_3 + b_2:\n        continue\n      if c_3_3 != a_3 + b_3:\n        continue\n      ans = \"Yes\"\n      break\n    if ans == \"Yes\":\n      break\n  if ans == \"Yes\":\n    break\n\nprint(ans)", "passed": true, "time": 0.14, "memory": 14316.0, "status": "done"}, {"code": "c=[[] for _ in range(3)]\nfor i in range(3):\n    c[i] = list(map(int, input().split()))\n\ndiff0 = [x - y for x, y in zip(c[0], c[1])]\ndiff1 = [x - y for x, y in zip(c[0], c[2])]\n \nif diff0[0] == diff0[1] and diff0[0] == diff0[2] and diff1[0] == diff1[1] and diff1[0] == diff1[2]:\n    print('Yes')\nelse:\n    print('No')\n\n\n\n", "passed": true, "time": 0.15, "memory": 14280.0, "status": "done"}, {"code": "#18 C - Takahashi's Information\nc = [list(map(int,input().split())) for _ in range(3)]\n\ncnt = 0\nif (c[0][0] - c[1][0]) == (c[0][1] - c[1][1]) == (c[0][2] - c[1][2]):\n    cnt += 1\nif (c[1][0] - c[2][0]) == (c[1][1] - c[2][1]) == (c[1][2] - c[2][2]):\n    cnt += 1\nif (c[2][0] - c[0][0]) == (c[2][1] - c[0][1]) == (c[2][2] - c[0][2]):\n    cnt += 1\nif cnt == 3:\n    print('Yes')\nelse:\n    print('No')", "passed": true, "time": 0.14, "memory": 14140.0, "status": "done"}, {"code": "import sys\n\ninput = sys.stdin.readline\n\n#N\n#t1 x1 y1t1 x1 y1\n#t2 x2 y2t2 x2 y2\n#\u22ee\u22ee\n#tN xN yNtN xN yN\nN = 3\nx = [0 for i in range(N)]\ny = [0 for i in range(N)]\nc =[[0 for i in range(N)] for i in range(N)]\n\nfor i in range(N):\n    c1, c2, c3 = map(int, input().split())\n    c[i][0] = c1\n    c[i][1] = c2\n    c[i][2] = c3\n\n\nx[0] = 0\nfor i in range(N):\n    y[i] = c[0][i] - x[0]\nx[1] = c[1][0] - y[0]\nx[2] = c[2][0] - y[0]\n\nflag = True\nfor i in range(N):\n   for j in range(N):\n       numx = x[i]\n       numy = y[j]\n       if not numx + numy == c[i][j]:\n           flag = False\nif flag:\n    print(\"Yes\")\nelse:\n    print(\"No\")", "passed": true, "time": 0.14, "memory": 14376.0, "status": "done"}, {"code": "c=[list(map(int,input().split())) for _ in range(3)]\na=[0,0,0]\nb=[0,0,0]\n\nfor i in range(3):\n  b[i] = c[0][i] - a[0]\n\nfor i in range(1,3):\n  a[i] = c[i][0] - b[0]\n\nfor i in range(3):\n  for j in range(3):\n    if c[i][j] != a[i]+b[j]:\n      print(\"No\")\n      return\nprint(\"Yes\")", "passed": true, "time": 0.14, "memory": 14272.0, "status": "done"}, {"code": "#18\nimport sys\nc = [list(map(int,input().split())) for i in range(3)]\n\nif not(c[0][0] - c[0][1] == c[1][0] - c[1][1] == c[2][0] - c[2][1]):\n    print(\"No\")\n    return\nif not(c[0][0] - c[0][2] == c[1][0] - c[1][2] == c[2][0] - c[2][2]):\n    print(\"No\")\n    return\nif not(c[0][1] - c[0][2] == c[1][1] - c[1][2] == c[2][1] - c[2][2]):\n    print(\"No\")\n    return\nif not(c[0][0] - c[1][0] == c[0][1] - c[1][1] == c[0][2] - c[1][2]):\n    print(\"No\")\n    return\nif not(c[0][0] - c[2][0] == c[0][1] - c[2][1] == c[0][2] - c[2][2]):\n    print(\"No\")\n    return\nif not(c[1][0] - c[2][0] == c[1][1] - c[2][1] == c[1][2] - c[2][2]):\n    print(\"No\")\n    return\nprint(\"Yes\")\n    \n\n", "passed": true, "time": 0.23, "memory": 14320.0, "status": "done"}, {"code": "totalArray=[]\nanswer ='No'\nYoko=False\ntate=False\nfor i in range(3):\n  array=input().split(' ')\n  for j in range(len(array)):\n    totalArray.append(int(array[j]))\nif (totalArray[1]-totalArray[0]) == (totalArray[4]-totalArray[3]) == (totalArray[7]-totalArray[6]) and (totalArray[2]-totalArray[1]) == (totalArray[5]-totalArray[4]) == (totalArray[8]-totalArray[7]):\n  Yoko=True\nif (totalArray[3]-totalArray[0]) == (totalArray[4]-totalArray[1]) == (totalArray[5]-totalArray[2]) and (totalArray[6]-totalArray[3]) == (totalArray[7]-totalArray[4]) == (totalArray[8]-totalArray[5]):\n  tate=True\nif Yoko==True and tate==True:\n  print('Yes')\nelse:\n  print('No')", "passed": true, "time": 0.15, "memory": 14240.0, "status": "done"}, {"code": "C = [list(map(int, input().split())) for _ in range(3)]\nif not (C[0][0] - C[0][1] == C[1][0] - C[1][1] == C[2][0] - C[2][1]):\n    print(\"No\")\n    return\nif not (C[0][0] - C[0][2] == C[1][0] - C[1][2] == C[2][0] - C[2][2]):\n    print(\"No\")\n    return\nif not (C[0][2] - C[0][1] == C[1][2] - C[1][1] == C[2][2] - C[2][1]):\n    print(\"No\")\n    return\n\nprint(\"Yes\")\n", "passed": true, "time": 0.35, "memory": 14336.0, "status": "done"}, {"code": "c = [\n    list(map(int, input().split()))\n    for _ in range(3)\n]\n\nf = True\nfor j in range(2):\n    x = c[j][0] - c[j + 1][0]\n    y = c[0][j] - c[0][j + 1]\n    for i in range(3):\n        if c[j][i] - c[j + 1][i] != x:\n            f = False\n        if c[i][j] - c[i][j + 1] != y:\n            f = False\nprint(['No', 'Yes'][int(f)])", "passed": true, "time": 0.15, "memory": 14088.0, "status": "done"}, {"code": "L = [list(map(int,input().split())) for _ in range(3)]\nans = 'Yes'\n\nif L[0][0] + L[1][1] != L[0][1] + L[1][0]: ans = 'No'\nif L[0][1] + L[1][2] != L[0][2] + L[1][1]: ans = 'No'\nif L[1][0] + L[2][1] != L[1][1] + L[2][0]: ans = 'No'\nif L[1][1] + L[2][2] != L[1][2] + L[2][1]: ans = 'No'\n\nprint(ans)", "passed": true, "time": 0.37, "memory": 14224.0, "status": "done"}, {"code": "a = []\na.append(list(map(int, input().split())))\na.append(list(map(int, input().split())))\na.append(list(map(int, input().split())))\n\nif not((a[0][2]-a[0][1]) == (a[1][2]-a[1][1]) == (a[2][2]-a[2][1])):\n    print(\"No\")\n    return\n\nif not((a[0][1]-a[0][0]) == (a[1][1]-a[1][0]) == (a[2][1]-a[2][0])):\n    print(\"No\")\n    return\n\nif not((a[0][0]-a[1][0]) == (a[0][1]-a[1][1]) == (a[0][2]-a[1][2])):\n    print(\"No\")\n    return\n\nif not((a[2][0]-a[1][0])== (a[2][1]-a[1][1])== (a[2][2]-a[1][2])):\n    print(\"No\")\n    return\nprint(\"Yes\")\n", "passed": true, "time": 0.39, "memory": 14136.0, "status": "done"}, {"code": "c = [[int(x) for x in input().split()] for _ in range(3)]\n\nans = False\nfor a1 in range(101):\n    for a2 in range(101):\n        for a3 in range(101):\n            ok = True\n            b1 = c[0][0] - a1\n            b2 = c[0][1] - a1\n            b3 = c[0][2] - a1\n            if c[1][0] != a2 + b1 or \\\n               c[1][1] != a2 + b2 or \\\n               c[1][2] != a2 + b3 or \\\n               c[2][0] != a3 + b1 or \\\n               c[2][1] != a3 + b2 or \\\n               c[2][2] != a3 + b3:\n               ok = False\n            if ok:\n                ans = True\n\nif ans:\n    print(\"Yes\")\nelse:\n    print(\"No\")   \n\n\n\n", "passed": true, "time": 1.0, "memory": 14344.0, "status": "done"}, {"code": "c = []\nfor i in range(3):\n    c.append(list(map(int, input().split())))\nflag = True\nfor i in range(2):\n    if flag==True and c[i][1]-c[i][0]==c[i+1][1]-c[i+1][0] and c[i][2]-c[i][1]==c[i+1][2]-c[i+1][1] and c[1][i]-c[0][i]==c[1][i+1]-c[0][i+1] and c[2][i]-c[1][i]==c[2][i+1]-c[1][i+1]:\n        flag = True\n    else:\n        flag = False\nif flag==True:\n    print('Yes')\nelse:\n    print('No')\n", "passed": true, "time": 0.16, "memory": 14132.0, "status": "done"}, {"code": "# Problem: https://atcoder.jp/contests/abc088/tasks/abc088_c\n# Python 3rd Try\n\nimport sys\n# from collections import defaultdict\n# import heapq,copy\nimport pprint as pp\n# from collections import deque\ndef II(): return int(sys.stdin.readline())\ndef MI(): return list(map(int, sys.stdin.readline().split()))\ndef LI(): return list(map(int, sys.stdin.readline().split()))\ndef LLI(rows_number): return [LI() for _ in range(rows_number)]\n\n\n# Const\nMAXSIZE = ( 1 << 31 ) -1\nMINSIZE = -( 1 << 31) + 1\nyes = \"Yes\"\nno = \"No\"\n\ndef solver(line00,line01,line02,\n           line10,line11,line12,\n           line20,line21,line22):\n\n    result = no\n    a0 = 0\n    b0 = line00\n    b1 = line01 - a0\n    b2 = line02 - a0\n    a1 = line10 -line00\n    a2 = line20 - line00\n    if (( a1 + b1 ) == line11) and (( a1 + b2 ) == line12\n    ) and (( a2 + b1 ) == line21) and (( a2 + b2 ) == line22):\n        result = yes\n    return result\n\n\ndef __starting_point():\n    line00 , line01, line02 = MI()\n    line10 , line11, line12 = MI()\n    line20 , line21, line22 = MI()\n    print((\"{}\".format(solver(line00, line01, line02,\n                             line10, line11, line12,\n                             line20, line21, line22))))\n\n__starting_point()", "passed": true, "time": 0.16, "memory": 14260.0, "status": "done"}, {"code": "#!/usr/bin/env python3\nimport sys\n\nYES = \"Yes\"  # type: str\nNO = \"No\"  # type: str\n\n\ndef solve(c: \"List[List[int]]\"):\n    from itertools import product\n    for a1, b1 in product(list(range(101)), repeat=2):\n        a2 = c[1][0] - b1\n        a3 = c[2][0] - b1\n        b2 = c[0][1] - a1\n        b3 = c[0][2] - a1\n        if a2 < 0 or a3 < 0 or b2 < 0 or b3 < 0:\n            continue\n        a = [a1, a2, a3]\n        b = [b1, b2, b3]\n        if all((a[i]+b[j])==c[i][j] for i, j in product(list(range(3)), repeat=2)):\n            return YES\n    return NO\n\n# Generated by 1.1.7.1 https://github.com/kyuridenamida/atcoder-tools\ndef main():\n    def iterate_tokens():\n        for line in sys.stdin:\n            for word in line.split():\n                yield word\n    tokens = iterate_tokens()\n    c = [[int(next(tokens)) for _ in range(3)] for _ in range(3)]  # type: \"List[List[int]]\"\n    print((solve(c)))\n\ndef test():\n    import doctest\n    doctest.testmod()\n\ndef __starting_point():\n    #test()\n    main()\n\n__starting_point()", "passed": true, "time": 0.24, "memory": 14212.0, "status": "done"}, {"code": "c = [list(map(int,input().split())) for _ in range(3)]\n\nok = True\n\nlis = [[0,1],[1,2],[2,0]]\n\nd = [[c[l[0]][i]-c[l[1]][i] for i in range(3)]for l in lis]\ne = [[c[i][l[0]]-c[i][l[1]] for i in range(3)]for l in lis]\n\nfor i in range(3):\n    if d[i].count(d[i][0])!=3:\n        ok = False\n    if e[i].count(e[i][0])!=3:\n        ok = False\n        \nif ok:\n    print('Yes')\nelse:\n    print('No')\n", "passed": true, "time": 0.14, "memory": 14088.0, "status": "done"}, {"code": "c = [list(map(int, input().split())) for _ in range(3)]\n\ndiff0 = [x - y for x, y in zip(c[0], c[1])]\ndiff1 = [x - y for x, y in zip(c[0], c[2])]\n\nif diff0[0] == diff0[1] and diff0[0] == diff0[2] and diff1[0] == diff1[1] and diff1[0] == diff1[2]:\n    print('Yes')\nelse:\n    print('No')", "passed": true, "time": 0.14, "memory": 14220.0, "status": "done"}, {"code": "c = []\nfor i in range(3):\n  c.append([int(x) for x in input().split()])\nres = \"No\"\nfor i in range(101):\n  for j in range(101):\n    for k in range(101):\n      if c[0][0] - i == c[1][0] - j == c[2][0] - k:\n        if c[0][1] - i == c[1][1] - j == c[2][1] - k:\n          if c[0][2] - i == c[1][2] - j == c[2][2] - k:\n            res = \"Yes\"\nprint(res)", "passed": true, "time": 0.6, "memory": 14192.0, "status": "done"}, {"code": "grid = [[-1] * 4 for i in range(4)]\nfor i in range(1,4):\n    grid[i][1],grid[i][2],grid[i][3] = list(map(int,input().split()))\n    grid[i][0] = min(grid[i][1],grid[i][2],grid[i][3])\n#print('----------')\n#for i in range(4):\n#    print(grid[i])\n\nisOK = False\nfor i in range(grid[1][0]+1):\n    grid[0][0] = i\n    grid[0][1] = grid[1][1]-i\n    grid[0][2] = grid[1][2]-i\n    grid[0][3] = grid[1][3]-i\n#    print('----------')\n#    for j in range(4):\n#        print(grid[j])\n    if grid[2][1]-grid[0][1] == grid[2][2]-grid[0][2] and grid[2][2]-grid[0][2] == grid[2][3]-grid[0][3]:\n        if grid[3][1]-grid[0][1] == grid[3][2]-grid[0][2] and grid[3][2]-grid[0][2] == grid[3][3]-grid[0][3]:\n            isOK = True\n            break\nif isOK:\n    print('Yes')\nelse:\n    print('No')\n", "passed": true, "time": 0.14, "memory": 14184.0, "status": "done"}, {"code": "c=[list(map(int,input().split())) for i in range(3)]\nif (c[0][0]+c[1][1]+c[2][2])*2==c[0][1]+c[0][2]+c[1][0]+c[1][2]+c[2][0]+c[2][1]:\n  print('Yes')\nelse:\n  print('No')", "passed": true, "time": 0.15, "memory": 14348.0, "status": "done"}, {"code": "def main():\n    grid = [list(map(int, input().split())) for i in range(3)]\n    all = sum(sum(grid, []))\n    a = [0] * 3\n    b = [0] * 3\n    for i1 in range(0, grid[0][0] + 1):\n        a[0] = i1\n        b[0] = grid[0][0] - i1\n        for j2 in range(0, grid[1][1] + 1):\n            a[1] = j2\n            b[1] = grid[1][1] - j2\n            for k3 in range(0, grid[2][2] + 1):\n                a[2] = k3\n                b[2] = grid[2][2] - k3\n                if (sum(a) * 3) + (sum(b) * 3) == all:\n                    print(\"Yes\")\n                    return\n    print('No')\n\n\n\n\n\ndef __starting_point():\n    main()\n__starting_point()", "passed": true, "time": 0.23, "memory": 14268.0, "status": "done"}, {"code": "c=[]\nfor i in range(3):\n    c.append([int(i) for i in input().split()])\n\na1,a2,a3=[0,c[1][1]-c[0][1],c[2][1]-c[0][1]]\nb1,b2,b3=[c[0][0],c[0][1],c[0][2]]\n\nans=[[a1+b1,a1+b2,a1+b3],[a2+b1,a2+b2,a2+b3],[a3+b1,a3+b2,a3+b3]]\n\nif ans==c:\n    print(\"Yes\")\nelse:\n    print(\"No\")\n\n", "passed": true, "time": 0.14, "memory": 14152.0, "status": "done"}, {"code": "\nc = [list(map(int,input().split())) for i in range(3)]\n\nfor i in range(0,2):\n    if not c[0][0+i]-c[0][1+i] \\\n        == c[1][0+i]-c[1][1+i] \\\n        == c[2][0+i]-c[2][1+i]:\n        print('No')\n        break\n\n    if not c[0+i][0]-c[1+i][0] \\\n        == c[0+i][1]-c[1+i][1] \\\n        == c[0+i][2]-c[1+i][2]:\n        print('No')\n        break\nelse:\n    print('Yes')\n", "passed": true, "time": 0.14, "memory": 14108.0, "status": "done"}, {"code": "def main():\n    c_lst = [list(map(int, input().split())) for _ in range(3)]\n    c1 = c_lst[0][0] + c_lst[1][1] + c_lst[2][2]\n    c2 = c_lst[1][0] + c_lst[2][1] + c_lst[0][2]\n    c3 = c_lst[2][0] + c_lst[0][1] + c_lst[1][2]\n    \n    if c1 == c2 and c2 == c3:\n        print('Yes')\n    else:\n        print('No')\n        \n\ndef __starting_point():\n    main()\n__starting_point()", "passed": true, "time": 0.14, "memory": 14132.0, "status": "done"}, {"code": "C = []\nfor _ in range(3):\n    c = list(map(int, input().split()))\n    C.append(c)\n    \na = [0, C[1][1]-C[0][1], C[2][1]-C[0][1]]\nb = [C[0][0], C[0][1], C[0][2]]\n\nans = [[a[0]+b[0], a[0]+b[1], a[0]+b[2]], [a[1]+b[0], a[1]+b[1], a[1]+b[2]], [a[2]+b[0], a[2]+b[1], a[2]+b[2]]]\n\nif ans == C:\n    print(\"Yes\")\nelse:\n    print(\"No\")", "passed": true, "time": 0.14, "memory": 14340.0, "status": "done"}, {"code": "c = [list(map(int,input().split())) for _ in range(3)]\nif (c[2][0]-c[1][0])==(c[2][1]-c[1][1])==(c[2][2]-c[1][2]) and (c[1][0]-c[0][0])==(c[1][1]-c[0][1])==(c[1][2]-c[0][2]) and (c[2][2]-c[2][1])==(c[1][2]-c[1][1])==(c[0][2]-c[0][1]) and (c[2][1]-c[2][0])==(c[1][1]-c[1][0])==(c[0][1]-c[0][0]):\n    print(\"Yes\")\nelse:\n    print(\"No\")", "passed": true, "time": 0.14, "memory": 14328.0, "status": "done"}, {"code": "def LIHW(h):\n    return [list(map(int, input().split())) for _ in range(h)]\n\n\nmasu = LIHW(3)\nans = \"Yes\"\nfor i in range(2):\n    if masu[i+1][1]-masu[i+1][0] != masu[0][1]-masu[0][0]:\n        ans = \"No\"\n    if masu[i+1][2]-masu[i+1][1] != masu[0][2]-masu[0][1]:\n        ans = \"No\"\nfor i in range(2):\n    if masu[1][i+1]-masu[0][i+1] != masu[1][0]-masu[0][0]:\n        ans = \"No\"\n    if masu[2][i+1]-masu[1][i+1] != masu[2][0]-masu[1][0]:\n        ans = \"No\"\nprint(ans)\n", "passed": true, "time": 0.14, "memory": 14132.0, "status": "done"}, {"code": "cc = [list(map(int, input().split())) for i in range(3)]\ntc = [x for c in cc for x in c]\n\nif sum(tc) % 3 != 0:\n  print('No')\nelse:\n  cnt = 0\n  for i in range(3):\n    cnt  += cc[i][i]\n  if cnt == sum(tc)//3:\n    print('Yes')\n  else:\n    print('No')", "passed": true, "time": 0.14, "memory": 14236.0, "status": "done"}, {"code": "c = [list(map(int, input().split())) for _ in range(3)]\n\nflag = True\n\nfor i in range(1, 3):\n    if not(c[i][0] - c[0][0] == c[i][1] - c[0][1] == c[i][2] - c[0][2]):\n        flag = False\n    if not(c[0][i] - c[0][0] == c[1][i] - c[1][0] == c[2][i] - c[2][0]):\n        flag = False\n\nif flag:\n    print(\"Yes\")\nelse:\n    print(\"No\")\n", "passed": true, "time": 0.14, "memory": 14224.0, "status": "done"}, {"code": "c = [list(map(int,input().split())) for i in range(3)]\nans = \"Yes\"\nfor i in range(3):\n    for j in range(3):\n        if c[i][j]==c[i-1][j]+c[i][j-1]-c[i-1][j-1]:\n            continue\n        ans = \"No\"\nprint(ans)", "passed": true, "time": 0.14, "memory": 14292.0, "status": "done"}, {"code": "\nc = [list(map(int, input().split())) for i in range(3)]\n\nflag = False\nfor a0 in range(-100, 200):\n    b0 = c[0][0] - a0\n    a1 = c[1][0] - b0\n    a2 = c[2][0] - b0\n    b1 = c[0][1] - a0\n    b2 = c[0][2] - a0\n    if (a1 + b1 == c[1][1]\n            and a2 + b1 == c[2][1]\n            and a1 + b2 == c[1][2]\n            and a2 + b2 == c[2][2]):\n        flag = True\n\nif flag:\n    print(\"Yes\")\nelse:\n    print(\"No\")", "passed": true, "time": 0.14, "memory": 14328.0, "status": "done"}, {"code": "import itertools\ndef main():\n    grid = [list(map(int, input().split())) for i in range(3)]\n    all = sum(sum(grid, []))\n    a = [0] * 3\n    b = [0] * 3\n    for i, j, k in itertools.product(list(range(grid[0][0] + 1)), list(range(grid[1][1] + 1)), list(range(grid[2][2] + 1))):\n        a = [i, j, k]\n        b = [grid[idx][idx] - v for idx, v in enumerate(a)]\n        if (sum(a) * 3) + (sum(b) * 3) == all:\n            print(\"Yes\")\n            return\n    print('No')\n\n\ndef __starting_point():\n    main()\n\n__starting_point()", "passed": true, "time": 0.23, "memory": 14288.0, "status": "done"}, {"code": "c = [[0]*3]*3\n\nfor i in range(3):\n    c[i] = [int(x) for x in input().split()]\n\nans = False\n\nif c[0][0] - c[0][1] == c[1][0] - c[1][1] == c[2][0] - c[2][1] and\\\n    c[0][0] - c[0][2] == c[1][0] - c[1][2] == c[2][0] - c[2][2]:\n    ans = True\n\nif ans == True:\n    print('Yes')\nelse: # ans == False:\n    print('No')", "passed": true, "time": 0.14, "memory": 14120.0, "status": "done"}, {"code": "xy = [list(map(int, input().split())) for i in range(3)]\nresult = sum(map(sum, xy))\nif result % 3 != 0:\n    print(\"No\")\n    return\nif result != (xy[0][0]+xy[1][1]+xy[2][2]) * 3:\n    print(\"No\")\n    return\nif result != (xy[0][2]+xy[1][1]+xy[2][0]) * 3:\n    print(\"No\")\n    return\nelse:\n    print(\"Yes\")", "passed": true, "time": 0.14, "memory": 14304.0, "status": "done"}, {"code": "a=[]\nfor i in range(3):\n  a.append(list(map(int,input().split())))\nif ((a[1][0]-a[0][0]==a[1][1]-a[0][1]==a[1][2]-a[0][2]) and\n    (a[2][0]-a[0][0]==a[2][1]-a[0][1]==a[2][2]-a[0][2])):\n  print('Yes')\nelse:\n  print('No')", "passed": true, "time": 0.15, "memory": 14196.0, "status": "done"}, {"code": "c1 = list(map(int,input().split()))\nc2 = list(map(int,input().split()))\nc3 = list(map(int,input().split()))\n\nsw = 1\nb1 = min(c1)\na = [c1[0]-b1, c1[1]-b1, c1[2]-b1]\n\nif not(c2[0]-a[0] == c2[1]-a[1] == c2[2]-a[2]):\n    sw = 0\nif not(c3[0]-a[0] == c3[1]-a[1] == c3[2]-a[2]):\n    sw = 0\n    \nprint(([\"No\",\"Yes\"][sw]))\n", "passed": true, "time": 0.14, "memory": 14160.0, "status": "done"}, {"code": "c1 = list(map(int,input().split()))\nc2 = list(map(int,input().split()))\nc3 = list(map(int,input().split()))\n\na1_a2 = c1[0] - c2[0]\na2_a3 = c2[0] - c3[0]\nb1_b2 = c1[0] - c1[1]\nb2_b3 = c1[1] - c1[2]\n\ncnt = 0\nif a1_a2 == c1[1]-c2[1] == c1[2]-c2[2]:\n    cnt += 1\nif a2_a3 == c2[1]-c3[1] == c2[2]-c3[2]:\n    cnt += 1\nif b1_b2 == c2[0]-c2[1] == c3[0]-c3[1]:\n    cnt += 1\nif b2_b3 == c2[1]-c2[2] == c3[1]-c3[2]:\n    cnt += 1\n\nif cnt == 4:\n    print(\"Yes\")\nelse:\n    print(\"No\")", "passed": true, "time": 0.14, "memory": 14308.0, "status": "done"}, {"code": "N = 3\nc = [list(map(int, input().split())) for _ in range(N)]\nds = [sum(c[j][(i + j) % 3] for j in range(N)) for i in range(N)]\nif ds[0] == ds[1] == ds[2]:\n    print(\"Yes\")\nelse:\n    print(\"No\")\n", "passed": true, "time": 0.14, "memory": 14188.0, "status": "done"}, {"code": "ls = []\nfor i in range(3):\n    ls.append(list(map(int,input().split())))\nans = 'Yes'\nif ls[1][1]-ls[1][0] != ls[0][1]-ls[0][0]:\n    ans = 'No'\nif ls[2][1]-ls[2][0] != ls[0][1]-ls[0][0]:\n    ans = 'No'   \nif ls[1][2]-ls[1][0] != ls[0][2]-ls[0][0]:\n    ans = 'No'\nif ls[2][2]-ls[2][0] != ls[0][2]-ls[0][0]:\n    ans = 'No'\nprint(ans)", "passed": true, "time": 0.14, "memory": 14312.0, "status": "done"}, {"code": "c = [list(map(int,input().split())) for _ in range(3)]\nif c[0][0]+c[1][1]+c[2][2]\\\n==c[0][2]+c[1][1]+c[2][0]\\\n==c[0][0]+c[1][2]+c[2][1]\\\n==c[0][1]+c[1][0]+c[2][2]:\n    print('Yes')\nelse:\n    print('No')\n\n\n", "passed": true, "time": 0.14, "memory": 14292.0, "status": "done"}, {"code": "C1 = list(map(int,input().split()))\nC2 = list(map(int,input().split()))\nC3 = list(map(int,input().split()))\n\nif C1[0]-C1[1]==C2[0]-C2[1]==C3[0]-C3[1] and C1[1]-C1[2]==C2[1]-C2[2]==C3[1]-C3[2] and C1[0]-C2[0]==C1[1]-C2[1]==C1[2]-C2[2] and C2[0]-C3[0]==C2[1]-C3[1]==C2[2]-C3[2]: \n  print(\"Yes\")\nelse:\n  print(\"No\")", "passed": true, "time": 0.14, "memory": 14108.0, "status": "done"}]