public class Main {
    private static java.util.Scanner scanner = new java.util.Scanner(System.in);

    public static void main(String[] args) {
        int max1 = 100, max2 = 100, max3 = 100, a[] = new int[9];
        for (int i = 0; i < 3; i++) {
            max1 = Math.min(max1, a[i * 3] = scanner.nextInt());
            max2 = Math.min(max2, a[i * 3 + 1] = scanner.nextInt());
            max3 = Math.min(max3, a[i * 3 + 2] = scanner.nextInt());
        }

        System.out.println((a[0] - max1 == a[1] - max2 && a[1] - max2 == a[2] - max3) &&
                (a[3] - max1 == a[4] - max2 && a[4] - max2 == a[5] - max3) &&
                (a[6] - max1 == a[7] - max2 && a[7] - max2 == a[8] - max3) ? "Yes" : "No");
    }
}
/tmp/hf-datasets-cache/medium/datasets/42704881117311-config-parquet-and-info-qiankunmu-Project_CodeNet-896c9d36/hub/datasets--qiankunmu--Project_CodeNet_Python800_and_Java250/snapshots/c899fde44a77ba1cc14973ed3de064e4ff3aadc7/Project_CodeNet_Java250.tar.gz