
import java.util.Scanner;

public class Main {

	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		String[] c1 = sc.nextLine().split(" ");
		String[] c2 = sc.nextLine().split(" ");
		String[] c3 = sc.nextLine().split(" ");
		int[][] grid = new int[][] { { Integer.valueOf(c1[0]), Integer.valueOf(c2[0]), Integer.valueOf(c3[0]) },
				{ Integer.valueOf(c1[1]), Integer.valueOf(c2[1]), Integer.valueOf(c3[1]) },
				{ Integer.valueOf(c1[2]), Integer.valueOf(c2[2]), Integer.valueOf(c3[2]) } };
		int[] x = new int[3];
		int[] y = new int[3];
		x[0] = 0;
		for (int i = 0; i < 3; i++)
			y[i] = grid[0][i] - x[0];
		for (int i = 0; i < 3; i++)
			x[i] = grid[i][0] - y[0];
		String ans = "Yes";
		for (int i = 0; i < 3; i++) {
			for (int j = 0; j < 3; j++) {
				if (x[i] + y[j] != grid[i][j])
					ans = "No";
			}
		}
		System.out.println(ans);
		sc.close();
	}
}
/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