import java.util.*;
public class Main {
	public static void main(String[] args){
		
		Scanner sc = new Scanner(System.in);
		
		int[] a = new int[9];
		for(int i = 0; i < 9; i++){
			a[i] = sc.nextInt();
		}
		int b1 = a[0];
		int b2 = a[1];
		int b3 = a[2];
		
		int a1 = 0;
		int a2 = a[3] - b1;
		int a3 = a[6] - b1;
		
		int check = 0;
		if(a[4] != a2 + b2 || a[5] != a2 + b3 || a[7] != a3 + b2 || a[8] != a3 + b3){
			check++;
		}
		
		if(check == 0){
			System.out.println("Yes");
		}else{
			System.out.println("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