import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        MyScanner in = new MyScanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        B solver = new B();
        solver.solve(1, in, out);
        out.close();
    }

    static class B {
        public void solve(int testNumber, MyScanner in, PrintWriter out) {
            int[] c = in.Int(9);
            int[] a = new int[3];
            int[] b = new int[3];
            for (int i = 0; i <= 100; i++) {
                for (int j = 0; j <= 100; j++) {
                    for (int k = 0; k <= 100; k++) {
                        a[0] = i;
                        a[1] = j;
                        a[2] = k;
                        b[0] = c[0] - a[0];
                        b[1] = c[4] - a[1];
                        b[2] = c[8] - a[2];
                        if (a[0] + b[1] == c[1] &&
                                a[0] + b[2] == c[2] &&
                                a[1] + b[0] == c[3] &&
                                a[1] + b[2] == c[5] &&
                                a[2] + b[0] == c[6] &&
                                a[2] + b[1] == c[7]) {
                            out.println("Yes");
                            return;
                        }
                    }
                }
            }
            out.println("No");
        }

    }

    static class MyScanner {
        private BufferedReader in;
        private StringTokenizer st;

        public MyScanner(InputStream stream) {
            in = new BufferedReader(new InputStreamReader(stream));
        }

        public String next() {
            while (st == null || !st.hasMoreTokens()) {
                try {
                    String rl = in.readLine();
                    if (rl == null) {
                        return null;
                    }
                    st = new StringTokenizer(rl);
                } catch (IOException e) {
                    return null;
                }
            }
            return st.nextToken();
        }

        public int Int() {
            return Integer.parseInt(next());
        }

        public int[] Int(int n) {
            int[] a = new int[n];
            for (int i = 0; i < n; i++) {
                a[i] = Int();
            }
            return a;
        }

    }
}
 import java.io.OutputStream; OutputStream java.io import java.io.IOException; IOException java.io import java.io.InputStream; InputStream java.io import java.io.PrintWriter; PrintWriter java.io import java.util.StringTokenizer; StringTokenizer java.util import java.io.IOException; IOException java.io import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io import java.io.InputStream; InputStream java.io public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        MyScanner in = new MyScanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        B solver = new B();
        solver.solve(1, in, out);
        out.close();
    }

    static class B {
        public void solve(int testNumber, MyScanner in, PrintWriter out) {
            int[] c = in.Int(9);
            int[] a = new int[3];
            int[] b = new int[3];
            for (int i = 0; i <= 100; i++) {
                for (int j = 0; j <= 100; j++) {
                    for (int k = 0; k <= 100; k++) {
                        a[0] = i;
                        a[1] = j;
                        a[2] = k;
                        b[0] = c[0] - a[0];
                        b[1] = c[4] - a[1];
                        b[2] = c[8] - a[2];
                        if (a[0] + b[1] == c[1] &&
                                a[0] + b[2] == c[2] &&
                                a[1] + b[0] == c[3] &&
                                a[1] + b[2] == c[5] &&
                                a[2] + b[0] == c[6] &&
                                a[2] + b[1] == c[7]) {
                            out.println("Yes");
                            return;
                        }
                    }
                }
            }
            out.println("No");
        }

    }

    static class MyScanner {
        private BufferedReader in;
        private StringTokenizer st;

        public MyScanner(InputStream stream) {
            in = new BufferedReader(new InputStreamReader(stream));
        }

        public String next() {
            while (st == null || !st.hasMoreTokens()) {
                try {
                    String rl = in.readLine();
                    if (rl == null) {
                        return null;
                    }
                    st = new StringTokenizer(rl);
                } catch (IOException e) {
                    return null;
                }
            }
            return st.nextToken();
        }

        public int Int() {
            return Integer.parseInt(next());
        }

        public int[] Int(int n) {
            int[] a = new int[n];
            for (int i = 0; i < n; i++) {
                a[i] = Int();
            }
            return a;
        }

    }
} Main public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        MyScanner in = new MyScanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        B solver = new B();
        solver.solve(1, in, out);
        out.close();
    } main {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        MyScanner in = new MyScanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        B solver = new B();
        solver.solve(1, in, out);
        out.close();
    } InputStream inputStream = System.in; inputStream System.in System System.in OutputStream outputStream = System.out; outputStream System.out System System.out MyScanner in = new MyScanner(inputStream); in new MyScanner(inputStream) PrintWriter out = new PrintWriter(outputStream); out new PrintWriter(outputStream) B solver = new B(); solver new B() solver.solve(1, in, out) solver.solve solver 1 in out out.close() out.close out String[] args args static class B {
        public void solve(int testNumber, MyScanner in, PrintWriter out) {
            int[] c = in.Int(9);
            int[] a = new int[3];
            int[] b = new int[3];
            for (int i = 0; i <= 100; i++) {
                for (int j = 0; j <= 100; j++) {
                    for (int k = 0; k <= 100; k++) {
                        a[0] = i;
                        a[1] = j;
                        a[2] = k;
                        b[0] = c[0] - a[0];
                        b[1] = c[4] - a[1];
                        b[2] = c[8] - a[2];
                        if (a[0] + b[1] == c[1] &&
                                a[0] + b[2] == c[2] &&
                                a[1] + b[0] == c[3] &&
                                a[1] + b[2] == c[5] &&
                                a[2] + b[0] == c[6] &&
                                a[2] + b[1] == c[7]) {
                            out.println("Yes");
                            return;
                        }
                    }
                }
            }
            out.println("No");
        }

    } B public void solve(int testNumber, MyScanner in, PrintWriter out) {
            int[] c = in.Int(9);
            int[] a = new int[3];
            int[] b = new int[3];
            for (int i = 0; i <= 100; i++) {
                for (int j = 0; j <= 100; j++) {
                    for (int k = 0; k <= 100; k++) {
                        a[0] = i;
                        a[1] = j;
                        a[2] = k;
                        b[0] = c[0] - a[0];
                        b[1] = c[4] - a[1];
                        b[2] = c[8] - a[2];
                        if (a[0] + b[1] == c[1] &&
                                a[0] + b[2] == c[2] &&
                                a[1] + b[0] == c[3] &&
                                a[1] + b[2] == c[5] &&
                                a[2] + b[0] == c[6] &&
                                a[2] + b[1] == c[7]) {
                            out.println("Yes");
                            return;
                        }
                    }
                }
            }
            out.println("No");
        } solve {
            int[] c = in.Int(9);
            int[] a = new int[3];
            int[] b = new int[3];
            for (int i = 0; i <= 100; i++) {
                for (int j = 0; j <= 100; j++) {
                    for (int k = 0; k <= 100; k++) {
                        a[0] = i;
                        a[1] = j;
                        a[2] = k;
                        b[0] = c[0] - a[0];
                        b[1] = c[4] - a[1];
                        b[2] = c[8] - a[2];
                        if (a[0] + b[1] == c[1] &&
                                a[0] + b[2] == c[2] &&
                                a[1] + b[0] == c[3] &&
                                a[1] + b[2] == c[5] &&
                                a[2] + b[0] == c[6] &&
                                a[2] + b[1] == c[7]) {
                            out.println("Yes");
                            return;
                        }
                    }
                }
            }
            out.println("No");
        } int[] c = in.Int(9); c in.Int(9) in.Int in 9 int[] a = new int[3]; a new int[3] 3 int[] b = new int[3]; b new int[3] 3 for (int i = 0; i <= 100; i++) {
                for (int j = 0; j <= 100; j++) {
                    for (int k = 0; k <= 100; k++) {
                        a[0] = i;
                        a[1] = j;
                        a[2] = k;
                        b[0] = c[0] - a[0];
                        b[1] = c[4] - a[1];
                        b[2] = c[8] - a[2];
                        if (a[0] + b[1] == c[1] &&
                                a[0] + b[2] == c[2] &&
                                a[1] + b[0] == c[3] &&
                                a[1] + b[2] == c[5] &&
                                a[2] + b[0] == c[6] &&
                                a[2] + b[1] == c[7]) {
                            out.println("Yes");
                            return;
                        }
                    }
                }
            } int i = 0; int i = 0; i 0 i <= 100 i 100 i++ i++ i {
                for (int j = 0; j <= 100; j++) {
                    for (int k = 0; k <= 100; k++) {
                        a[0] = i;
                        a[1] = j;
                        a[2] = k;
                        b[0] = c[0] - a[0];
                        b[1] = c[4] - a[1];
                        b[2] = c[8] - a[2];
                        if (a[0] + b[1] == c[1] &&
                                a[0] + b[2] == c[2] &&
                                a[1] + b[0] == c[3] &&
                                a[1] + b[2] == c[5] &&
                                a[2] + b[0] == c[6] &&
                                a[2] + b[1] == c[7]) {
                            out.println("Yes");
                            return;
                        }
                    }
                }
            } {
                for (int j = 0; j <= 100; j++) {
                    for (int k = 0; k <= 100; k++) {
                        a[0] = i;
                        a[1] = j;
                        a[2] = k;
                        b[0] = c[0] - a[0];
                        b[1] = c[4] - a[1];
                        b[2] = c[8] - a[2];
                        if (a[0] + b[1] == c[1] &&
                                a[0] + b[2] == c[2] &&
                                a[1] + b[0] == c[3] &&
                                a[1] + b[2] == c[5] &&
                                a[2] + b[0] == c[6] &&
                                a[2] + b[1] == c[7]) {
                            out.println("Yes");
                            return;
                        }
                    }
                }
            } for (int j = 0; j <= 100; j++) {
                    for (int k = 0; k <= 100; k++) {
                        a[0] = i;
                        a[1] = j;
                        a[2] = k;
                        b[0] = c[0] - a[0];
                        b[1] = c[4] - a[1];
                        b[2] = c[8] - a[2];
                        if (a[0] + b[1] == c[1] &&
                                a[0] + b[2] == c[2] &&
                                a[1] + b[0] == c[3] &&
                                a[1] + b[2] == c[5] &&
                                a[2] + b[0] == c[6] &&
                                a[2] + b[1] == c[7]) {
                            out.println("Yes");
                            return;
                        }
                    }
                } int j = 0; int j = 0; j 0 j <= 100 j 100 j++ j++ j {
                    for (int k = 0; k <= 100; k++) {
                        a[0] = i;
                        a[1] = j;
                        a[2] = k;
                        b[0] = c[0] - a[0];
                        b[1] = c[4] - a[1];
                        b[2] = c[8] - a[2];
                        if (a[0] + b[1] == c[1] &&
                                a[0] + b[2] == c[2] &&
                                a[1] + b[0] == c[3] &&
                                a[1] + b[2] == c[5] &&
                                a[2] + b[0] == c[6] &&
                                a[2] + b[1] == c[7]) {
                            out.println("Yes");
                            return;
                        }
                    }
                } {
                    for (int k = 0; k <= 100; k++) {
                        a[0] = i;
                        a[1] = j;
                        a[2] = k;
                        b[0] = c[0] - a[0];
                        b[1] = c[4] - a[1];
                        b[2] = c[8] - a[2];
                        if (a[0] + b[1] == c[1] &&
                                a[0] + b[2] == c[2] &&
                                a[1] + b[0] == c[3] &&
                                a[1] + b[2] == c[5] &&
                                a[2] + b[0] == c[6] &&
                                a[2] + b[1] == c[7]) {
                            out.println("Yes");
                            return;
                        }
                    }
                } for (int k = 0; k <= 100; k++) {
                        a[0] = i;
                        a[1] = j;
                        a[2] = k;
                        b[0] = c[0] - a[0];
                        b[1] = c[4] - a[1];
                        b[2] = c[8] - a[2];
                        if (a[0] + b[1] == c[1] &&
                                a[0] + b[2] == c[2] &&
                                a[1] + b[0] == c[3] &&
                                a[1] + b[2] == c[5] &&
                                a[2] + b[0] == c[6] &&
                                a[2] + b[1] == c[7]) {
                            out.println("Yes");
                            return;
                        }
                    } int k = 0; int k = 0; k 0 k <= 100 k 100 k++ k++ k {
                        a[0] = i;
                        a[1] = j;
                        a[2] = k;
                        b[0] = c[0] - a[0];
                        b[1] = c[4] - a[1];
                        b[2] = c[8] - a[2];
                        if (a[0] + b[1] == c[1] &&
                                a[0] + b[2] == c[2] &&
                                a[1] + b[0] == c[3] &&
                                a[1] + b[2] == c[5] &&
                                a[2] + b[0] == c[6] &&
                                a[2] + b[1] == c[7]) {
                            out.println("Yes");
                            return;
                        }
                    } {
                        a[0] = i;
                        a[1] = j;
                        a[2] = k;
                        b[0] = c[0] - a[0];
                        b[1] = c[4] - a[1];
                        b[2] = c[8] - a[2];
                        if (a[0] + b[1] == c[1] &&
                                a[0] + b[2] == c[2] &&
                                a[1] + b[0] == c[3] &&
                                a[1] + b[2] == c[5] &&
                                a[2] + b[0] == c[6] &&
                                a[2] + b[1] == c[7]) {
                            out.println("Yes");
                            return;
                        }
                    } a[0] = i a[0] a 0 i a[1] = j a[1] a 1 j a[2] = k a[2] a 2 k b[0] = c[0] - a[0] b[0] b 0 c[0] - a[0] c[0] c 0 a[0] a 0 b[1] = c[4] - a[1] b[1] b 1 c[4] - a[1] c[4] c 4 a[1] a 1 b[2] = c[8] - a[2] b[2] b 2 c[8] - a[2] c[8] c 8 a[2] a 2 if (a[0] + b[1] == c[1] &&
                                a[0] + b[2] == c[2] &&
                                a[1] + b[0] == c[3] &&
                                a[1] + b[2] == c[5] &&
                                a[2] + b[0] == c[6] &&
                                a[2] + b[1] == c[7]) {
                            out.println("Yes");
                            return;
                        } a[0] + b[1] == c[1] &&
                                a[0] + b[2] == c[2] &&
                                a[1] + b[0] == c[3] &&
                                a[1] + b[2] == c[5] &&
                                a[2] + b[0] == c[6] &&
                                a[2] + b[1] == c[7] a[2] + b[0] == c[6] a[1] + b[2] == c[5] a[1] + b[0] == c[3] a[0] + b[1] == c[1] &&
                                a[0] + b[2] == c[2] &&
                                a[1] + b[0] == c[3] &&
                                a[1] + b[2] == c[5] &&
                                a[2] + b[0] == c[6] &&
                                a[2] + b[1] == c[7] a[0] + b[1] == c[1] a[0] + b[1] a[0] a 0 b[1] b 1 c[1] c 1 a[0] + b[2] == c[2] a[0] + b[2] a[0] a 0 b[2] b 2 c[2] c 2 a[1] + b[0] == c[3] a[1] + b[0] a[1] a 1 b[0] b 0 c[3] c 3 a[1] + b[2] == c[5] a[1] + b[2] a[1] a 1 b[2] b 2 c[5] c 5 a[2] + b[0] == c[6] a[2] + b[0] a[2] a 2 b[0] b 0 c[6] c 6 a[2] + b[1] == c[7] a[2] + b[1] a[2] a 2 b[1] b 1 c[7] c 7 {
                            out.println("Yes");
                            return;
                        } out.println("Yes") out.println out "Yes" return; out.println("No") out.println out "No" int testNumber testNumber MyScanner in in PrintWriter out out static class MyScanner {
        private BufferedReader in;
        private StringTokenizer st;

        public MyScanner(InputStream stream) {
            in = new BufferedReader(new InputStreamReader(stream));
        }

        public String next() {
            while (st == null || !st.hasMoreTokens()) {
                try {
                    String rl = in.readLine();
                    if (rl == null) {
                        return null;
                    }
                    st = new StringTokenizer(rl);
                } catch (IOException e) {
                    return null;
                }
            }
            return st.nextToken();
        }

        public int Int() {
            return Integer.parseInt(next());
        }

        public int[] Int(int n) {
            int[] a = new int[n];
            for (int i = 0; i < n; i++) {
                a[i] = Int();
            }
            return a;
        }

    } MyScanner private BufferedReader in; in private StringTokenizer st; st public MyScanner(InputStream stream) {
            in = new BufferedReader(new InputStreamReader(stream));
        } MyScanner {
            in = new BufferedReader(new InputStreamReader(stream));
        } in = new BufferedReader(new InputStreamReader(stream)) in new BufferedReader(new InputStreamReader(stream)) InputStream stream stream public String next() {
            while (st == null || !st.hasMoreTokens()) {
                try {
                    String rl = in.readLine();
                    if (rl == null) {
                        return null;
                    }
                    st = new StringTokenizer(rl);
                } catch (IOException e) {
                    return null;
                }
            }
            return st.nextToken();
        } next {
            while (st == null || !st.hasMoreTokens()) {
                try {
                    String rl = in.readLine();
                    if (rl == null) {
                        return null;
                    }
                    st = new StringTokenizer(rl);
                } catch (IOException e) {
                    return null;
                }
            }
            return st.nextToken();
        } while (st == null || !st.hasMoreTokens()) {
                try {
                    String rl = in.readLine();
                    if (rl == null) {
                        return null;
                    }
                    st = new StringTokenizer(rl);
                } catch (IOException e) {
                    return null;
                }
            } st == null || !st.hasMoreTokens() st == null st null !st.hasMoreTokens() st.hasMoreTokens() st.hasMoreTokens st {
                try {
                    String rl = in.readLine();
                    if (rl == null) {
                        return null;
                    }
                    st = new StringTokenizer(rl);
                } catch (IOException e) {
                    return null;
                }
            } try {
                    String rl = in.readLine();
                    if (rl == null) {
                        return null;
                    }
                    st = new StringTokenizer(rl);
                } catch (IOException e) {
                    return null;
                } catch (IOException e) {
                    return null;
                } IOException e {
                    return null;
                } return null; null {
                    String rl = in.readLine();
                    if (rl == null) {
                        return null;
                    }
                    st = new StringTokenizer(rl);
                } String rl = in.readLine(); rl in.readLine() in.readLine in if (rl == null) {
                        return null;
                    } rl == null rl null {
                        return null;
                    } return null; null st = new StringTokenizer(rl) st new StringTokenizer(rl) return st.nextToken(); st.nextToken() st.nextToken st public int Int() {
            return Integer.parseInt(next());
        } Int {
            return Integer.parseInt(next());
        } return Integer.parseInt(next()); Integer.parseInt(next()) Integer.parseInt Integer next() next public int[] Int(int n) {
            int[] a = new int[n];
            for (int i = 0; i < n; i++) {
                a[i] = Int();
            }
            return a;
        } Int {
            int[] a = new int[n];
            for (int i = 0; i < n; i++) {
                a[i] = Int();
            }
            return a;
        } int[] a = new int[n]; a new int[n] n for (int i = 0; i < n; i++) {
                a[i] = Int();
            } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
                a[i] = Int();
            } {
                a[i] = Int();
            } a[i] = Int() a[i] a i Int() Int return a; a int n n public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        MyScanner in = new MyScanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        B solver = new B();
        solver.solve(1, in, out);
        out.close();
    }

    static class B {
        public void solve(int testNumber, MyScanner in, PrintWriter out) {
            int[] c = in.Int(9);
            int[] a = new int[3];
            int[] b = new int[3];
            for (int i = 0; i <= 100; i++) {
                for (int j = 0; j <= 100; j++) {
                    for (int k = 0; k <= 100; k++) {
                        a[0] = i;
                        a[1] = j;
                        a[2] = k;
                        b[0] = c[0] - a[0];
                        b[1] = c[4] - a[1];
                        b[2] = c[8] - a[2];
                        if (a[0] + b[1] == c[1] &&
                                a[0] + b[2] == c[2] &&
                                a[1] + b[0] == c[3] &&
                                a[1] + b[2] == c[5] &&
                                a[2] + b[0] == c[6] &&
                                a[2] + b[1] == c[7]) {
                            out.println("Yes");
                            return;
                        }
                    }
                }
            }
            out.println("No");
        }

    }

    static class MyScanner {
        private BufferedReader in;
        private StringTokenizer st;

        public MyScanner(InputStream stream) {
            in = new BufferedReader(new InputStreamReader(stream));
        }

        public String next() {
            while (st == null || !st.hasMoreTokens()) {
                try {
                    String rl = in.readLine();
                    if (rl == null) {
                        return null;
                    }
                    st = new StringTokenizer(rl);
                } catch (IOException e) {
                    return null;
                }
            }
            return st.nextToken();
        }

        public int Int() {
            return Integer.parseInt(next());
        }

        public int[] Int(int n) {
            int[] a = new int[n];
            for (int i = 0; i < n; i++) {
                a[i] = Int();
            }
            return a;
        }

    }
} public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        MyScanner in = new MyScanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        B solver = new B();
        solver.solve(1, in, out);
        out.close();
    }

    static class B {
        public void solve(int testNumber, MyScanner in, PrintWriter out) {
            int[] c = in.Int(9);
            int[] a = new int[3];
            int[] b = new int[3];
            for (int i = 0; i <= 100; i++) {
                for (int j = 0; j <= 100; j++) {
                    for (int k = 0; k <= 100; k++) {
                        a[0] = i;
                        a[1] = j;
                        a[2] = k;
                        b[0] = c[0] - a[0];
                        b[1] = c[4] - a[1];
                        b[2] = c[8] - a[2];
                        if (a[0] + b[1] == c[1] &&
                                a[0] + b[2] == c[2] &&
                                a[1] + b[0] == c[3] &&
                                a[1] + b[2] == c[5] &&
                                a[2] + b[0] == c[6] &&
                                a[2] + b[1] == c[7]) {
                            out.println("Yes");
                            return;
                        }
                    }
                }
            }
            out.println("No");
        }

    }

    static class MyScanner {
        private BufferedReader in;
        private StringTokenizer st;

        public MyScanner(InputStream stream) {
            in = new BufferedReader(new InputStreamReader(stream));
        }

        public String next() {
            while (st == null || !st.hasMoreTokens()) {
                try {
                    String rl = in.readLine();
                    if (rl == null) {
                        return null;
                    }
                    st = new StringTokenizer(rl);
                } catch (IOException e) {
                    return null;
                }
            }
            return st.nextToken();
        }

        public int Int() {
            return Integer.parseInt(next());
        }

        public int[] Int(int n) {
            int[] a = new int[n];
            for (int i = 0; i < n; i++) {
                a[i] = Int();
            }
            return a;
        }

    }
} Main
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        MyScanner in = new MyScanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        B solver = new B();
        solver.solve(1, in, out);
        out.close();
    }

    static class B {
        public void solve(int testNumber, MyScanner in, PrintWriter out) {
            int[] c = in.Int(9);
            int[] a = new int[3];
            int[] b = new int[3];
            for (int i = 0; i <= 100; i++) {
                for (int j = 0; j <= 100; j++) {
                    for (int k = 0; k <= 100; k++) {
                        a[0] = i;
                        a[1] = j;
                        a[2] = k;
                        b[0] = c[0] - a[0];
                        b[1] = c[4] - a[1];
                        b[2] = c[8] - a[2];
                        if (a[0] + b[1] == c[1] &&
                                a[0] + b[2] == c[2] &&
                                a[1] + b[0] == c[3] &&
                                a[1] + b[2] == c[5] &&
                                a[2] + b[0] == c[6] &&
                                a[2] + b[1] == c[7]) {
                            out.println("Yes");
                            return;
                        }
                    }
                }
            }
            out.println("No");
        }

    }

    static class MyScanner {
        private BufferedReader in;
        private StringTokenizer st;

        public MyScanner(InputStream stream) {
            in = new BufferedReader(new InputStreamReader(stream));
        }

        public String next() {
            while (st == null || !st.hasMoreTokens()) {
                try {
                    String rl = in.readLine();
                    if (rl == null) {
                        return null;
                    }
                    st = new StringTokenizer(rl);
                } catch (IOException e) {
                    return null;
                }
            }
            return st.nextToken();
        }

        public int Int() {
            return Integer.parseInt(next());
        }

        public int[] Int(int n) {
            int[] a = new int[n];
            for (int i = 0; i < n; i++) {
                a[i] = Int();
            }
            return a;
        }

    }
}

