import java.util.*;
import java.io.*;

public class Main {
	static final int mod = (int) 1e9 + 7;
	static final int DX[] = { -1, 0, 1, 0 }, DY[] = { 0, -1, 0, 1 };
	static final int[] DX8 = { -1, -1, -1, 0, 0, 1, 1, 1 }, DY8 = { -1, 0, 1, -1, 1, -1, 0, 1 };
	static final int INF = Integer.MAX_VALUE / 3;
	static final long LINF = Long.MAX_VALUE / 3;
	static final String nextLine = "\n";

	public static void main(String[] args) {
		FastScanner fs = new FastScanner(System.in);
		int field[][] = new int[3][3];
		for(int i=0;i<3;i++) {
			for(int j=0;j<3;j++) {
				field[i][j] = fs.nextInt();
			}
		}
		int s = field[0][0] + field[1][1] + field[2][2];
		int t = field[0][1] + field[1][2] + field[2][0];
		int u = field[0][2] + field[1][0] + field[2][1];
		if(s == t && t == u)System.out.println("Yes");
		else System.out.println("No");
	}

	//MOD culculations
	static long plus(long x, long y) {
		long res = (x + y) % mod;
		return res < 0 ? res + mod : res;
	}

	static long sub(long x, long y) {
		long res = (x - y) % mod;
		return res < 0 ? res + mod : res;
	}

	static long mul(long x, long y) {
		long res = (x * y) % mod;
		return res < 0 ? res + mod : res;
	}

	static long div(long x, long y) {
		long res = x * pow(y, mod - 2) % mod;
		return res < 0 ? res + mod : res;
	}

	static long pow(long x, long y) {
		if (y < 0)
			return 0;
		if (y == 0)
			return 1;
		if (y % 2 == 1)
			return (x * pow(x, y - 1)) % mod;
		long root = pow(x, y / 2);
		return root * root % mod;
	}
}

//高速なScanner
class FastScanner {
	private BufferedReader reader = null;
	private StringTokenizer tokenizer = null;

	public FastScanner(InputStream in) {
		reader = new BufferedReader(new InputStreamReader(in));
		tokenizer = null;
	}

	public String next() {
		if (tokenizer == null || !tokenizer.hasMoreTokens()) {
			try {
				tokenizer = new StringTokenizer(reader.readLine());
			} catch (IOException e) {
				throw new RuntimeException(e);
			}
		}
		return tokenizer.nextToken();
	}

	public String nextLine() {
		if (tokenizer == null || !tokenizer.hasMoreTokens()) {
			try {
				return reader.readLine();
			} catch (IOException e) {
				throw new RuntimeException(e);
			}
		}
		return tokenizer.nextToken("\n");
	}

	public long nextLong() {
		return Long.parseLong(next());
	}

	public int nextInt() {
		return Integer.parseInt(next());
	}

	public double nextDouble() {
		return Double.parseDouble(next());
	}

	public int[] nextIntArray(int n) {
		int[] a = new int[n];
		for (int i = 0; i < n; i++)
			a[i] = nextInt();
		return a;
	}

	public long[] nextLongArray(int n) {
		long[] a = new long[n];
		for (int i = 0; i < n; i++)
			a[i] = nextLong();
		return a;
	}
} import java.util.*; util.* java import java.io.*; io.* java public class Main {
	static final int mod = (int) 1e9 + 7;
	static final int DX[] = { -1, 0, 1, 0 }, DY[] = { 0, -1, 0, 1 };
	static final int[] DX8 = { -1, -1, -1, 0, 0, 1, 1, 1 }, DY8 = { -1, 0, 1, -1, 1, -1, 0, 1 };
	static final int INF = Integer.MAX_VALUE / 3;
	static final long LINF = Long.MAX_VALUE / 3;
	static final String nextLine = "\n";

	public static void main(String[] args) {
		FastScanner fs = new FastScanner(System.in);
		int field[][] = new int[3][3];
		for(int i=0;i<3;i++) {
			for(int j=0;j<3;j++) {
				field[i][j] = fs.nextInt();
			}
		}
		int s = field[0][0] + field[1][1] + field[2][2];
		int t = field[0][1] + field[1][2] + field[2][0];
		int u = field[0][2] + field[1][0] + field[2][1];
		if(s == t && t == u)System.out.println("Yes");
		else System.out.println("No");
	}

	//MOD culculations
	static long plus(long x, long y) {
		long res = (x + y) % mod;
		return res < 0 ? res + mod : res;
	}

	static long sub(long x, long y) {
		long res = (x - y) % mod;
		return res < 0 ? res + mod : res;
	}

	static long mul(long x, long y) {
		long res = (x * y) % mod;
		return res < 0 ? res + mod : res;
	}

	static long div(long x, long y) {
		long res = x * pow(y, mod - 2) % mod;
		return res < 0 ? res + mod : res;
	}

	static long pow(long x, long y) {
		if (y < 0)
			return 0;
		if (y == 0)
			return 1;
		if (y % 2 == 1)
			return (x * pow(x, y - 1)) % mod;
		long root = pow(x, y / 2);
		return root * root % mod;
	}
} Main static final int mod = (int) 1e9 + 7; mod (int) 1e9 + 7 (int) 1e9 7 static final int DX[] = { -1, 0, 1, 0 } DX { -1, 0, 1, 0 } -1 1 0 1 0 DY[] = { 0, -1, 0, 1 }; DY { 0, -1, 0, 1 } 0 -1 1 0 1 static final int[] DX8 = { -1, -1, -1, 0, 0, 1, 1, 1 } DX8 { -1, -1, -1, 0, 0, 1, 1, 1 } -1 1 -1 1 -1 1 0 0 1 1 1 DY8 = { -1, 0, 1, -1, 1, -1, 0, 1 }; DY8 { -1, 0, 1, -1, 1, -1, 0, 1 } -1 1 0 1 -1 1 1 -1 1 0 1 static final int INF = Integer.MAX_VALUE / 3; INF Integer.MAX_VALUE / 3 Integer.MAX_VALUE Integer Integer.MAX_VALUE 3 static final long LINF = Long.MAX_VALUE / 3; LINF Long.MAX_VALUE / 3 Long.MAX_VALUE Long Long.MAX_VALUE 3 static final String nextLine = "\n"; nextLine "\n" public static void main(String[] args) {
		FastScanner fs = new FastScanner(System.in);
		int field[][] = new int[3][3];
		for(int i=0;i<3;i++) {
			for(int j=0;j<3;j++) {
				field[i][j] = fs.nextInt();
			}
		}
		int s = field[0][0] + field[1][1] + field[2][2];
		int t = field[0][1] + field[1][2] + field[2][0];
		int u = field[0][2] + field[1][0] + field[2][1];
		if(s == t && t == u)System.out.println("Yes");
		else System.out.println("No");
	} main {
		FastScanner fs = new FastScanner(System.in);
		int field[][] = new int[3][3];
		for(int i=0;i<3;i++) {
			for(int j=0;j<3;j++) {
				field[i][j] = fs.nextInt();
			}
		}
		int s = field[0][0] + field[1][1] + field[2][2];
		int t = field[0][1] + field[1][2] + field[2][0];
		int u = field[0][2] + field[1][0] + field[2][1];
		if(s == t && t == u)System.out.println("Yes");
		else System.out.println("No");
	} FastScanner fs = new FastScanner(System.in); fs new FastScanner(System.in) int field[][] = new int[3][3]; field new int[3][3] 3 3 for(int i=0;i<3;i++) {
			for(int j=0;j<3;j++) {
				field[i][j] = fs.nextInt();
			}
		} int i=0; int i=0; i 0 i<3 i 3 i++ i++ i {
			for(int j=0;j<3;j++) {
				field[i][j] = fs.nextInt();
			}
		} {
			for(int j=0;j<3;j++) {
				field[i][j] = fs.nextInt();
			}
		} for(int j=0;j<3;j++) {
				field[i][j] = fs.nextInt();
			} int j=0; int j=0; j 0 j<3 j 3 j++ j++ j {
				field[i][j] = fs.nextInt();
			} {
				field[i][j] = fs.nextInt();
			} field[i][j] = fs.nextInt() field[i][j] field[i] field i j fs.nextInt() fs.nextInt fs int s = field[0][0] + field[1][1] + field[2][2]; s field[0][0] + field[1][1] + field[2][2] field[0][0] + field[1][1] + field[2][2] field[0][0] field[0] field 0 0 field[1][1] field[1] field 1 1 field[2][2] field[2] field 2 2 int t = field[0][1] + field[1][2] + field[2][0]; t field[0][1] + field[1][2] + field[2][0] field[0][1] + field[1][2] + field[2][0] field[0][1] field[0] field 0 1 field[1][2] field[1] field 1 2 field[2][0] field[2] field 2 0 int u = field[0][2] + field[1][0] + field[2][1]; u field[0][2] + field[1][0] + field[2][1] field[0][2] + field[1][0] + field[2][1] field[0][2] field[0] field 0 2 field[1][0] field[1] field 1 0 field[2][1] field[2] field 2 1 if(s == t && t == u)System.out.println("Yes");
		else System.out.println("No"); s == t && t == u s == t s t t == u t u System.out.println("Yes") System.out.println System.out System System.out "Yes" System.out.println("No") System.out.println System.out System System.out "No" String[] args args //MOD culculations
	static long plus(long x, long y) {
		long res = (x + y) % mod;
		return res < 0 ? res + mod : res;
	} plus {
		long res = (x + y) % mod;
		return res < 0 ? res + mod : res;
	} long res = (x + y) % mod; res (x + y) % mod (x + y) x y mod return res < 0 ? res + mod : res; res < 0 ? res + mod : res res < 0 res 0 res + mod res mod res long x x long y y static long sub(long x, long y) {
		long res = (x - y) % mod;
		return res < 0 ? res + mod : res;
	} sub {
		long res = (x - y) % mod;
		return res < 0 ? res + mod : res;
	} long res = (x - y) % mod; res (x - y) % mod (x - y) x y mod return res < 0 ? res + mod : res; res < 0 ? res + mod : res res < 0 res 0 res + mod res mod res long x x long y y static long mul(long x, long y) {
		long res = (x * y) % mod;
		return res < 0 ? res + mod : res;
	} mul {
		long res = (x * y) % mod;
		return res < 0 ? res + mod : res;
	} long res = (x * y) % mod; res (x * y) % mod (x * y) x y mod return res < 0 ? res + mod : res; res < 0 ? res + mod : res res < 0 res 0 res + mod res mod res long x x long y y static long div(long x, long y) {
		long res = x * pow(y, mod - 2) % mod;
		return res < 0 ? res + mod : res;
	} div {
		long res = x * pow(y, mod - 2) % mod;
		return res < 0 ? res + mod : res;
	} long res = x * pow(y, mod - 2) % mod; res x * pow(y, mod - 2) % mod x * pow(y, mod - 2) x pow(y, mod - 2) pow y mod - 2 mod 2 mod return res < 0 ? res + mod : res; res < 0 ? res + mod : res res < 0 res 0 res + mod res mod res long x x long y y static long pow(long x, long y) {
		if (y < 0)
			return 0;
		if (y == 0)
			return 1;
		if (y % 2 == 1)
			return (x * pow(x, y - 1)) % mod;
		long root = pow(x, y / 2);
		return root * root % mod;
	} pow {
		if (y < 0)
			return 0;
		if (y == 0)
			return 1;
		if (y % 2 == 1)
			return (x * pow(x, y - 1)) % mod;
		long root = pow(x, y / 2);
		return root * root % mod;
	} if (y < 0)
			return 0; y < 0 y 0 return 0; 0 if (y == 0)
			return 1; y == 0 y 0 return 1; 1 if (y % 2 == 1)
			return (x * pow(x, y - 1)) % mod; y % 2 == 1 y % 2 y 2 1 return (x * pow(x, y - 1)) % mod; (x * pow(x, y - 1)) % mod (x * pow(x, y - 1)) x pow(x, y - 1) pow x y - 1 y 1 mod long root = pow(x, y / 2); root pow(x, y / 2) pow x y / 2 y 2 return root * root % mod; root * root % mod root * root root root mod long x x long y y class FastScanner {
	private BufferedReader reader = null;
	private StringTokenizer tokenizer = null;

	public FastScanner(InputStream in) {
		reader = new BufferedReader(new InputStreamReader(in));
		tokenizer = null;
	}

	public String next() {
		if (tokenizer == null || !tokenizer.hasMoreTokens()) {
			try {
				tokenizer = new StringTokenizer(reader.readLine());
			} catch (IOException e) {
				throw new RuntimeException(e);
			}
		}
		return tokenizer.nextToken();
	}

	public String nextLine() {
		if (tokenizer == null || !tokenizer.hasMoreTokens()) {
			try {
				return reader.readLine();
			} catch (IOException e) {
				throw new RuntimeException(e);
			}
		}
		return tokenizer.nextToken("\n");
	}

	public long nextLong() {
		return Long.parseLong(next());
	}

	public int nextInt() {
		return Integer.parseInt(next());
	}

	public double nextDouble() {
		return Double.parseDouble(next());
	}

	public int[] nextIntArray(int n) {
		int[] a = new int[n];
		for (int i = 0; i < n; i++)
			a[i] = nextInt();
		return a;
	}

	public long[] nextLongArray(int n) {
		long[] a = new long[n];
		for (int i = 0; i < n; i++)
			a[i] = nextLong();
		return a;
	}
} FastScanner private BufferedReader reader = null; reader null private StringTokenizer tokenizer = null; tokenizer null public FastScanner(InputStream in) {
		reader = new BufferedReader(new InputStreamReader(in));
		tokenizer = null;
	} FastScanner {
		reader = new BufferedReader(new InputStreamReader(in));
		tokenizer = null;
	} reader = new BufferedReader(new InputStreamReader(in)) reader new BufferedReader(new InputStreamReader(in)) tokenizer = null tokenizer null InputStream in in public String next() {
		if (tokenizer == null || !tokenizer.hasMoreTokens()) {
			try {
				tokenizer = new StringTokenizer(reader.readLine());
			} catch (IOException e) {
				throw new RuntimeException(e);
			}
		}
		return tokenizer.nextToken();
	} next {
		if (tokenizer == null || !tokenizer.hasMoreTokens()) {
			try {
				tokenizer = new StringTokenizer(reader.readLine());
			} catch (IOException e) {
				throw new RuntimeException(e);
			}
		}
		return tokenizer.nextToken();
	} if (tokenizer == null || !tokenizer.hasMoreTokens()) {
			try {
				tokenizer = new StringTokenizer(reader.readLine());
			} catch (IOException e) {
				throw new RuntimeException(e);
			}
		} tokenizer == null || !tokenizer.hasMoreTokens() tokenizer == null tokenizer null !tokenizer.hasMoreTokens() tokenizer.hasMoreTokens() tokenizer.hasMoreTokens tokenizer {
			try {
				tokenizer = new StringTokenizer(reader.readLine());
			} catch (IOException e) {
				throw new RuntimeException(e);
			}
		} try {
				tokenizer = new StringTokenizer(reader.readLine());
			} catch (IOException e) {
				throw new RuntimeException(e);
			} catch (IOException e) {
				throw new RuntimeException(e);
			} IOException e {
				throw new RuntimeException(e);
			} throw new RuntimeException(e); new RuntimeException(e) {
				tokenizer = new StringTokenizer(reader.readLine());
			} tokenizer = new StringTokenizer(reader.readLine()) tokenizer new StringTokenizer(reader.readLine()) return tokenizer.nextToken(); tokenizer.nextToken() tokenizer.nextToken tokenizer public String nextLine() {
		if (tokenizer == null || !tokenizer.hasMoreTokens()) {
			try {
				return reader.readLine();
			} catch (IOException e) {
				throw new RuntimeException(e);
			}
		}
		return tokenizer.nextToken("\n");
	} nextLine {
		if (tokenizer == null || !tokenizer.hasMoreTokens()) {
			try {
				return reader.readLine();
			} catch (IOException e) {
				throw new RuntimeException(e);
			}
		}
		return tokenizer.nextToken("\n");
	} if (tokenizer == null || !tokenizer.hasMoreTokens()) {
			try {
				return reader.readLine();
			} catch (IOException e) {
				throw new RuntimeException(e);
			}
		} tokenizer == null || !tokenizer.hasMoreTokens() tokenizer == null tokenizer null !tokenizer.hasMoreTokens() tokenizer.hasMoreTokens() tokenizer.hasMoreTokens tokenizer {
			try {
				return reader.readLine();
			} catch (IOException e) {
				throw new RuntimeException(e);
			}
		} try {
				return reader.readLine();
			} catch (IOException e) {
				throw new RuntimeException(e);
			} catch (IOException e) {
				throw new RuntimeException(e);
			} IOException e {
				throw new RuntimeException(e);
			} throw new RuntimeException(e); new RuntimeException(e) {
				return reader.readLine();
			} return reader.readLine(); reader.readLine() reader.readLine reader return tokenizer.nextToken("\n"); tokenizer.nextToken("\n") tokenizer.nextToken tokenizer "\n" public long nextLong() {
		return Long.parseLong(next());
	} nextLong {
		return Long.parseLong(next());
	} return Long.parseLong(next()); Long.parseLong(next()) Long.parseLong Long next() next public int nextInt() {
		return Integer.parseInt(next());
	} nextInt {
		return Integer.parseInt(next());
	} return Integer.parseInt(next()); Integer.parseInt(next()) Integer.parseInt Integer next() next public double nextDouble() {
		return Double.parseDouble(next());
	} nextDouble {
		return Double.parseDouble(next());
	} return Double.parseDouble(next()); Double.parseDouble(next()) Double.parseDouble Double next() next public int[] nextIntArray(int n) {
		int[] a = new int[n];
		for (int i = 0; i < n; i++)
			a[i] = nextInt();
		return a;
	} nextIntArray {
		int[] a = new int[n];
		for (int i = 0; i < n; i++)
			a[i] = nextInt();
		return a;
	} int[] a = new int[n]; a new int[n] n for (int i = 0; i < n; i++)
			a[i] = nextInt(); int i = 0; int i = 0; i 0 i < n i n i++ i++ i a[i] = nextInt(); a[i] = nextInt() a[i] a i nextInt() nextInt return a; a int n n public long[] nextLongArray(int n) {
		long[] a = new long[n];
		for (int i = 0; i < n; i++)
			a[i] = nextLong();
		return a;
	} nextLongArray {
		long[] a = new long[n];
		for (int i = 0; i < n; i++)
			a[i] = nextLong();
		return a;
	} long[] a = new long[n]; a new long[n] n for (int i = 0; i < n; i++)
			a[i] = nextLong(); int i = 0; int i = 0; i 0 i < n i n i++ i++ i a[i] = nextLong(); a[i] = nextLong() a[i] a i nextLong() nextLong return a; a int n n public class Main {
	static final int mod = (int) 1e9 + 7;
	static final int DX[] = { -1, 0, 1, 0 }, DY[] = { 0, -1, 0, 1 };
	static final int[] DX8 = { -1, -1, -1, 0, 0, 1, 1, 1 }, DY8 = { -1, 0, 1, -1, 1, -1, 0, 1 };
	static final int INF = Integer.MAX_VALUE / 3;
	static final long LINF = Long.MAX_VALUE / 3;
	static final String nextLine = "\n";

	public static void main(String[] args) {
		FastScanner fs = new FastScanner(System.in);
		int field[][] = new int[3][3];
		for(int i=0;i<3;i++) {
			for(int j=0;j<3;j++) {
				field[i][j] = fs.nextInt();
			}
		}
		int s = field[0][0] + field[1][1] + field[2][2];
		int t = field[0][1] + field[1][2] + field[2][0];
		int u = field[0][2] + field[1][0] + field[2][1];
		if(s == t && t == u)System.out.println("Yes");
		else System.out.println("No");
	}

	//MOD culculations
	static long plus(long x, long y) {
		long res = (x + y) % mod;
		return res < 0 ? res + mod : res;
	}

	static long sub(long x, long y) {
		long res = (x - y) % mod;
		return res < 0 ? res + mod : res;
	}

	static long mul(long x, long y) {
		long res = (x * y) % mod;
		return res < 0 ? res + mod : res;
	}

	static long div(long x, long y) {
		long res = x * pow(y, mod - 2) % mod;
		return res < 0 ? res + mod : res;
	}

	static long pow(long x, long y) {
		if (y < 0)
			return 0;
		if (y == 0)
			return 1;
		if (y % 2 == 1)
			return (x * pow(x, y - 1)) % mod;
		long root = pow(x, y / 2);
		return root * root % mod;
	}
} public class Main {
	static final int mod = (int) 1e9 + 7;
	static final int DX[] = { -1, 0, 1, 0 }, DY[] = { 0, -1, 0, 1 };
	static final int[] DX8 = { -1, -1, -1, 0, 0, 1, 1, 1 }, DY8 = { -1, 0, 1, -1, 1, -1, 0, 1 };
	static final int INF = Integer.MAX_VALUE / 3;
	static final long LINF = Long.MAX_VALUE / 3;
	static final String nextLine = "\n";

	public static void main(String[] args) {
		FastScanner fs = new FastScanner(System.in);
		int field[][] = new int[3][3];
		for(int i=0;i<3;i++) {
			for(int j=0;j<3;j++) {
				field[i][j] = fs.nextInt();
			}
		}
		int s = field[0][0] + field[1][1] + field[2][2];
		int t = field[0][1] + field[1][2] + field[2][0];
		int u = field[0][2] + field[1][0] + field[2][1];
		if(s == t && t == u)System.out.println("Yes");
		else System.out.println("No");
	}

	//MOD culculations
	static long plus(long x, long y) {
		long res = (x + y) % mod;
		return res < 0 ? res + mod : res;
	}

	static long sub(long x, long y) {
		long res = (x - y) % mod;
		return res < 0 ? res + mod : res;
	}

	static long mul(long x, long y) {
		long res = (x * y) % mod;
		return res < 0 ? res + mod : res;
	}

	static long div(long x, long y) {
		long res = x * pow(y, mod - 2) % mod;
		return res < 0 ? res + mod : res;
	}

	static long pow(long x, long y) {
		if (y < 0)
			return 0;
		if (y == 0)
			return 1;
		if (y % 2 == 1)
			return (x * pow(x, y - 1)) % mod;
		long root = pow(x, y / 2);
		return root * root % mod;
	}
} Main
import java.util.*;
import java.io.*;

public class Main {
	static final int mod = (int) 1e9 + 7;
	static final int DX[] = { -1, 0, 1, 0 }, DY[] = { 0, -1, 0, 1 };
	static final int[] DX8 = { -1, -1, -1, 0, 0, 1, 1, 1 }, DY8 = { -1, 0, 1, -1, 1, -1, 0, 1 };
	static final int INF = Integer.MAX_VALUE / 3;
	static final long LINF = Long.MAX_VALUE / 3;
	static final String nextLine = "\n";

	public static void main(String[] args) {
		FastScanner fs = new FastScanner(System.in);
		int field[][] = new int[3][3];
		for(int i=0;i<3;i++) {
			for(int j=0;j<3;j++) {
				field[i][j] = fs.nextInt();
			}
		}
		int s = field[0][0] + field[1][1] + field[2][2];
		int t = field[0][1] + field[1][2] + field[2][0];
		int u = field[0][2] + field[1][0] + field[2][1];
		if(s == t && t == u)System.out.println("Yes");
		else System.out.println("No");
	}

	//MOD culculations
	static long plus(long x, long y) {
		long res = (x + y) % mod;
		return res < 0 ? res + mod : res;
	}

	static long sub(long x, long y) {
		long res = (x - y) % mod;
		return res < 0 ? res + mod : res;
	}

	static long mul(long x, long y) {
		long res = (x * y) % mod;
		return res < 0 ? res + mod : res;
	}

	static long div(long x, long y) {
		long res = x * pow(y, mod - 2) % mod;
		return res < 0 ? res + mod : res;
	}

	static long pow(long x, long y) {
		if (y < 0)
			return 0;
		if (y == 0)
			return 1;
		if (y % 2 == 1)
			return (x * pow(x, y - 1)) % mod;
		long root = pow(x, y / 2);
		return root * root % mod;
	}
}

//高速なScanner
class FastScanner {
	private BufferedReader reader = null;
	private StringTokenizer tokenizer = null;

	public FastScanner(InputStream in) {
		reader = new BufferedReader(new InputStreamReader(in));
		tokenizer = null;
	}

	public String next() {
		if (tokenizer == null || !tokenizer.hasMoreTokens()) {
			try {
				tokenizer = new StringTokenizer(reader.readLine());
			} catch (IOException e) {
				throw new RuntimeException(e);
			}
		}
		return tokenizer.nextToken();
	}

	public String nextLine() {
		if (tokenizer == null || !tokenizer.hasMoreTokens()) {
			try {
				return reader.readLine();
			} catch (IOException e) {
				throw new RuntimeException(e);
			}
		}
		return tokenizer.nextToken("\n");
	}

	public long nextLong() {
		return Long.parseLong(next());
	}

	public int nextInt() {
		return Integer.parseInt(next());
	}

	public double nextDouble() {
		return Double.parseDouble(next());
	}

	public int[] nextIntArray(int n) {
		int[] a = new int[n];
		for (int i = 0; i < n; i++)
			a[i] = nextInt();
		return a;
	}

	public long[] nextLongArray(int n) {
		long[] a = new long[n];
		for (int i = 0; i < n; i++)
			a[i] = nextLong();
		return a;
	}
}