import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Scanner;

/**
 * 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;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskC solver = new TaskC();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskC {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int[][] map = new int[3][3];
            int[][] subMap = new int[3][3];
            String ans = "Yes";
            for (int i = 0; i < 3; i++) {
                map[i][0] = in.nextInt();
                map[i][1] = in.nextInt();
                map[i][2] = in.nextInt();
            }

            for (int i = 0; i < 3; i++) {
                subMap[i][0] = map[i][0] - map[0][0];
                subMap[i][1] = map[i][1] - map[0][1];
                subMap[i][2] = map[i][2] - map[0][2];
                if (subMap[i][0] == subMap[i][1] && subMap[i][0] == subMap[i][2]) {
                } else {
                    ans = "No";
                }
            }

            out.print(ans);

        }

    }
}
 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.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskC solver = new TaskC();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskC {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int[][] map = new int[3][3];
            int[][] subMap = new int[3][3];
            String ans = "Yes";
            for (int i = 0; i < 3; i++) {
                map[i][0] = in.nextInt();
                map[i][1] = in.nextInt();
                map[i][2] = in.nextInt();
            }

            for (int i = 0; i < 3; i++) {
                subMap[i][0] = map[i][0] - map[0][0];
                subMap[i][1] = map[i][1] - map[0][1];
                subMap[i][2] = map[i][2] - map[0][2];
                if (subMap[i][0] == subMap[i][1] && subMap[i][0] == subMap[i][2]) {
                } else {
                    ans = "No";
                }
            }

            out.print(ans);

        }

    }
} Main public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskC solver = new TaskC();
        solver.solve(1, in, out);
        out.close();
    } main {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskC solver = new TaskC();
        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 Scanner in = new Scanner(inputStream); in new Scanner(inputStream) PrintWriter out = new PrintWriter(outputStream); out new PrintWriter(outputStream) TaskC solver = new TaskC(); solver new TaskC() solver.solve(1, in, out) solver.solve solver 1 in out out.close() out.close out String[] args args static class TaskC {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int[][] map = new int[3][3];
            int[][] subMap = new int[3][3];
            String ans = "Yes";
            for (int i = 0; i < 3; i++) {
                map[i][0] = in.nextInt();
                map[i][1] = in.nextInt();
                map[i][2] = in.nextInt();
            }

            for (int i = 0; i < 3; i++) {
                subMap[i][0] = map[i][0] - map[0][0];
                subMap[i][1] = map[i][1] - map[0][1];
                subMap[i][2] = map[i][2] - map[0][2];
                if (subMap[i][0] == subMap[i][1] && subMap[i][0] == subMap[i][2]) {
                } else {
                    ans = "No";
                }
            }

            out.print(ans);

        }

    } TaskC public void solve(int testNumber, Scanner in, PrintWriter out) {
            int[][] map = new int[3][3];
            int[][] subMap = new int[3][3];
            String ans = "Yes";
            for (int i = 0; i < 3; i++) {
                map[i][0] = in.nextInt();
                map[i][1] = in.nextInt();
                map[i][2] = in.nextInt();
            }

            for (int i = 0; i < 3; i++) {
                subMap[i][0] = map[i][0] - map[0][0];
                subMap[i][1] = map[i][1] - map[0][1];
                subMap[i][2] = map[i][2] - map[0][2];
                if (subMap[i][0] == subMap[i][1] && subMap[i][0] == subMap[i][2]) {
                } else {
                    ans = "No";
                }
            }

            out.print(ans);

        } solve {
            int[][] map = new int[3][3];
            int[][] subMap = new int[3][3];
            String ans = "Yes";
            for (int i = 0; i < 3; i++) {
                map[i][0] = in.nextInt();
                map[i][1] = in.nextInt();
                map[i][2] = in.nextInt();
            }

            for (int i = 0; i < 3; i++) {
                subMap[i][0] = map[i][0] - map[0][0];
                subMap[i][1] = map[i][1] - map[0][1];
                subMap[i][2] = map[i][2] - map[0][2];
                if (subMap[i][0] == subMap[i][1] && subMap[i][0] == subMap[i][2]) {
                } else {
                    ans = "No";
                }
            }

            out.print(ans);

        } int[][] map = new int[3][3]; map new int[3][3] 3 3 int[][] subMap = new int[3][3]; subMap new int[3][3] 3 3 String ans = "Yes"; ans "Yes" for (int i = 0; i < 3; i++) {
                map[i][0] = in.nextInt();
                map[i][1] = in.nextInt();
                map[i][2] = in.nextInt();
            } int i = 0; int i = 0; i 0 i < 3 i 3 i++ i++ i {
                map[i][0] = in.nextInt();
                map[i][1] = in.nextInt();
                map[i][2] = in.nextInt();
            } {
                map[i][0] = in.nextInt();
                map[i][1] = in.nextInt();
                map[i][2] = in.nextInt();
            } map[i][0] = in.nextInt() map[i][0] map[i] map i 0 in.nextInt() in.nextInt in map[i][1] = in.nextInt() map[i][1] map[i] map i 1 in.nextInt() in.nextInt in map[i][2] = in.nextInt() map[i][2] map[i] map i 2 in.nextInt() in.nextInt in for (int i = 0; i < 3; i++) {
                subMap[i][0] = map[i][0] - map[0][0];
                subMap[i][1] = map[i][1] - map[0][1];
                subMap[i][2] = map[i][2] - map[0][2];
                if (subMap[i][0] == subMap[i][1] && subMap[i][0] == subMap[i][2]) {
                } else {
                    ans = "No";
                }
            } int i = 0; int i = 0; i 0 i < 3 i 3 i++ i++ i {
                subMap[i][0] = map[i][0] - map[0][0];
                subMap[i][1] = map[i][1] - map[0][1];
                subMap[i][2] = map[i][2] - map[0][2];
                if (subMap[i][0] == subMap[i][1] && subMap[i][0] == subMap[i][2]) {
                } else {
                    ans = "No";
                }
            } {
                subMap[i][0] = map[i][0] - map[0][0];
                subMap[i][1] = map[i][1] - map[0][1];
                subMap[i][2] = map[i][2] - map[0][2];
                if (subMap[i][0] == subMap[i][1] && subMap[i][0] == subMap[i][2]) {
                } else {
                    ans = "No";
                }
            } subMap[i][0] = map[i][0] - map[0][0] subMap[i][0] subMap[i] subMap i 0 map[i][0] - map[0][0] map[i][0] map[i] map i 0 map[0][0] map[0] map 0 0 subMap[i][1] = map[i][1] - map[0][1] subMap[i][1] subMap[i] subMap i 1 map[i][1] - map[0][1] map[i][1] map[i] map i 1 map[0][1] map[0] map 0 1 subMap[i][2] = map[i][2] - map[0][2] subMap[i][2] subMap[i] subMap i 2 map[i][2] - map[0][2] map[i][2] map[i] map i 2 map[0][2] map[0] map 0 2 if (subMap[i][0] == subMap[i][1] && subMap[i][0] == subMap[i][2]) {
                } else {
                    ans = "No";
                } subMap[i][0] == subMap[i][1] && subMap[i][0] == subMap[i][2] subMap[i][0] == subMap[i][1] subMap[i][0] subMap[i] subMap i 0 subMap[i][1] subMap[i] subMap i 1 subMap[i][0] == subMap[i][2] subMap[i][0] subMap[i] subMap i 0 subMap[i][2] subMap[i] subMap i 2 {
                } {
                    ans = "No";
                } ans = "No" ans "No" out.print(ans) out.print out ans int testNumber testNumber Scanner in in PrintWriter out out public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskC solver = new TaskC();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskC {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int[][] map = new int[3][3];
            int[][] subMap = new int[3][3];
            String ans = "Yes";
            for (int i = 0; i < 3; i++) {
                map[i][0] = in.nextInt();
                map[i][1] = in.nextInt();
                map[i][2] = in.nextInt();
            }

            for (int i = 0; i < 3; i++) {
                subMap[i][0] = map[i][0] - map[0][0];
                subMap[i][1] = map[i][1] - map[0][1];
                subMap[i][2] = map[i][2] - map[0][2];
                if (subMap[i][0] == subMap[i][1] && subMap[i][0] == subMap[i][2]) {
                } else {
                    ans = "No";
                }
            }

            out.print(ans);

        }

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

    static class TaskC {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int[][] map = new int[3][3];
            int[][] subMap = new int[3][3];
            String ans = "Yes";
            for (int i = 0; i < 3; i++) {
                map[i][0] = in.nextInt();
                map[i][1] = in.nextInt();
                map[i][2] = in.nextInt();
            }

            for (int i = 0; i < 3; i++) {
                subMap[i][0] = map[i][0] - map[0][0];
                subMap[i][1] = map[i][1] - map[0][1];
                subMap[i][2] = map[i][2] - map[0][2];
                if (subMap[i][0] == subMap[i][1] && subMap[i][0] == subMap[i][2]) {
                } else {
                    ans = "No";
                }
            }

            out.print(ans);

        }

    }
} Main
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Scanner;

/**
 * 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;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskC solver = new TaskC();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskC {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int[][] map = new int[3][3];
            int[][] subMap = new int[3][3];
            String ans = "Yes";
            for (int i = 0; i < 3; i++) {
                map[i][0] = in.nextInt();
                map[i][1] = in.nextInt();
                map[i][2] = in.nextInt();
            }

            for (int i = 0; i < 3; i++) {
                subMap[i][0] = map[i][0] - map[0][0];
                subMap[i][1] = map[i][1] - map[0][1];
                subMap[i][2] = map[i][2] - map[0][2];
                if (subMap[i][0] == subMap[i][1] && subMap[i][0] == subMap[i][2]) {
                } else {
                    ans = "No";
                }
            }

            out.print(ans);

        }

    }
}

