Language: C++

#include<bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
#define rep(i, j, n) for (int i = (int)(j); i < (int)(n); ++i)
int main(){
  string s;
  int c[3][3];
  int sum=0;
  rep(i,3)rep(j,3){
     cin>>c[i][j];
     sum+=c[i][j]; 
  }
  if(sum%3){
     cout<<"No"; 
  }else{
     int d[3][3];
     rep(i,3){
        int a=0;
        rep(j,2)
          repj(k,j+1,3)
            d[i][a++]=c[i][j]-c[i][k];
     }
     rep(i,3)
        rep(j,2)
          repj(k,j+1,3)
          if(d[j][i]!=d[k][i]){
             cout<<"No";
             return 0; 
          }
    rep(i,3){
        int a=0;
        rep(j,2)
          repj(k,j+1,3)
            d[i][a++]=c[j][i]-c[k][i];
     }
     rep(i,3)
        rep(j,2)
          repj(k,j+1,3)
          if(d[j][i]!=d[k][i]){
             cout<<"No";
             return 0; 
          }
    cout<<"Yes";
  }
  
  return 0;
}

Compiler output:
a.cc:4:9: warning: "rep" redefined
    4 | #define rep(i, j, n) for (int i = (int)(j); i < (int)(n); ++i)
      |         ^~~
a.cc:3:9: note: this is the location of the previous definition
    3 | #define rep(i, n) for (int i = 0; i < (int)(n); ++i)
      |         ^~~
a.cc:9:10: error: macro "rep" requires 3 arguments, but only 2 given
    9 |   rep(i,3)rep(j,3){
      |          ^
a.cc:4:9: note: macro "rep" defined here
    4 | #define rep(i, j, n) for (int i = (int)(j); i < (int)(n); ++i)
      |         ^~~
a.cc:9:18: error: macro "rep" requires 3 arguments, but only 2 given
    9 |   rep(i,3)rep(j,3){
      |                  ^
a.cc:4:9: note: macro "rep" defined here
    4 | #define rep(i, j, n) for (int i = (int)(j); i < (int)(n); ++i)
      |         ^~~
a.cc:17:13: error: macro "rep" requires 3 arguments, but only 2 given
   17 |      rep(i,3){
      |             ^
a.cc:4:9: note: macro "rep" defined here
    4 | #define rep(i, j, n) for (int i = (int)(j); i < (int)(n); ++i)
      |         ^~~
a.cc:19:16: error: macro "rep" requires 3 arguments, but only 2 given
   19 |         rep(j,2)
      |                ^
a.cc:4:9: note: macro "rep" defined here
    4 | #define rep(i, j, n) for (int i = (int)(j); i < (int)(n); ++i)
      |         ^~~
a.cc:23:13: error: macro "rep" requires 3 arguments, but only 2 given
   23 |      rep(i,3)
      |             ^
a.cc:4:9: note: macro "rep" defined here
    4 | #define rep(i, j, n) for (int i = (int)(j); i < (int)(n); ++i)
      |         ^~~
a.cc:24:16: error: macro "rep" requires 3 arguments, but only 2 given
   24 |         rep(j,2)
      |                ^
a.cc:4:9: note: macro "rep" defined here
    4 | #define rep(i, j, n) for (int i = (int)(j); i < (int)(n); ++i)
      |         ^~~
a.cc:30:12: error: macro "rep" requires 3 arguments, but only 2 given
   30 |     rep(i,3){
      |            ^
a.cc:4:9: note: macro "rep" defined here
    4 | #define rep(i, j, n) for (int i = (int)(j); i < (int)(n); ++i)
      |         ^~~
a.cc:32:16: error: macro "rep" requires 3 arguments, but only 2 given
   32 |         rep(j,2)
      |                ^
a.cc:4:9: note: macro "rep" defined here
    4 | #define rep(i, j, n) for (int i = (int)(j); i < (int)(n); ++i)
      |         ^~~
a.cc:36:13: error: macro "rep" requires 3 arguments, but only 2 given
   36 |      rep(i,3)
      |             ^
a.cc:4:9: note: macro "rep" defined here
    4 | #define rep(i, j, n) for (int i = (int)(j); i < (int)(n); ++i)
      |         ^~~
a.cc:37:16: error: macro "rep" requires 3 arguments, but only 2 given
   37 |         rep(j,2)
      |                ^
a.cc:4:9: note: macro "rep" defined here
    4 | #define rep(i, j, n) for (int i = (int)(j); i < (int)(n); ++i)
      |         ^~~
a.cc: In function 'int main()':
a.cc:9:3: error: 'rep' was not declared in this scope
    9 |   rep(i,3)rep(j,3){
      |   ^~~
a.cc:17:9: error: expected ';' before '{' token
   17 |      rep(i,3){
      |         ^    ~
      |         ;
a.cc:23:9: error: expected ';' before 'rep'
   23 |      rep(i,3)
      |         ^
      |         ;
   24 |         rep(j,2)
      |         ~~~
a.cc:30:8: error: expected ';' before '{' token
   30 |     rep(i,3){
      |        ^    ~
      |        ;
a.cc:36:9: error: expected ';' before 'rep'
   36 |      rep(i,3)
      |         ^
      |         ;
   37 |         rep(j,2)
      |         ~~~