public class Matrix {
	public int[][] M;
	
	public Matrix(int[][] M) {
		this.M = new int[M.length][M[0].length];
		
		for (int row = 0; row < M.length; row++) {
			for (int col = 0; col < M[0].length; col++) {
				this.M[row][col] = M[row][col];
			}
		}		
	}
	
	public Matrix add(Matrix A) {
		Matrix sum = new Matrix(new int[A.M.length][A.M[0].length]);
		for (int row = 0; row < M.length; row++) {
			for (int col = 0; col < M[0].length; col++) {
				sum.M[row][col] = this.M[row][col] + A.M[row][col]; 
			}
		}
		return sum;
	}
	
	public Matrix multiply(int a) {
		Matrix product = new Matrix(new int[this.M.length][this.M[0].length]);
		// Compute the product
		return product;
	}
	
	public String toString() {
		String s = "";
		for (int row = 0; row < M.length; row++) {
			for (int col = 0; col < M[0].length; col++) {
				s += M[row][col] + " ";
			}
			s+="\n";
		}	
		return s;
	}
}
