import java.util.Scanner;

public class Main{

	public static void main(String[] args) {
		Scanner scn = new Scanner(System.in);
		int[] c = new int[6];
		for(int i = 0;i < 9;i++) {
			int a = scn.nextInt();
			if(i < 3) {
				c[2*i]+=a;
				c[2*i+1] += a;
			}else{
				if(i == 3) {
					c[2]+=a;
					c[4]+=a;
				}
				if(i==4) {
					c[0]+=a;
					c[5]+=a;
				}
				if(i == 5) {
					c[1]+=a;
					c[3]+=a;
				}
				if(i == 6) {
					c[3]+=a;
					c[5]+=a;
				}
				if(i == 7) {
					c[1]+=a;
					c[4]+=a;
				}
				if(i == 8) {
					c[0]+=a;
					c[2]+=a;
				}
			}
		}
		boolean ans = true;
		for(int i = 0;i < 6;i++) {
			ans &= (c[i]==c[0]);
		}
		System.out.println(ans?"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