import java.util.*;
import java.io.*;
import java.nio.charset.StandardCharsets;

public class Main {
	public static void main(String[] args) throws IOException {
		InputStreamReader reader = new InputStreamReader(System.in, StandardCharsets.UTF_8);
		BufferedReader in = new BufferedReader(reader);
		Main ins = new Main(in);
		ins.calc();
		ins.showResult();
	}

	int[][] c;

	Main(BufferedReader in) throws IOException {
		c = new int[3][3];
		for (int i = 0; i < 3; ++i) {
			String[] tokens = in.readLine().split(" ");
			for (int j = 0; j < 3; ++j) {
				c[i][j] = Integer.parseInt(tokens[j]);
			}
		}
		for (int i = 0; i < 3; ++i) {
			for (int j = 1; j < 3; ++j) {
				c[j][i] -= c[0][i];
			}
		}
		for (int i = 0; i < 3; ++i) {
			c[0][i] = 0;
		}
		boolean enable = true;
		for (int i = 0; i < 3; ++i) {
			boolean cond = true;
			for (int j = 1; j < 3; ++j) {
				if (c[i][j] != c[i][0]) {
					cond = false;
				}
			}
			if (!cond) {
				enable = false;
				break;
			}
		}
		System.out.println((enable ? "Yes" : "No"));
	}

	void calc() {
	}

	void showResult() {
	}
}

/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