class Main{
java.
util.
Scanner i
= new java.
util.
Scanner(System.
in); int n = i.nextInt();
int m = i.nextInt();
int array1[][] = new int[n][m];
int array2[][] = new int[n][m];
int array_sum[][] = new int[n][m];
for(int k = 0; k < n; k++){
for(int j = 0; j < m; j++){
array1[k][j] = i.nextInt();
}
}
for(int k = 0; k < n; k++){
for(int j = 0; j < m; j++){
array2[k][j] = i.nextInt();
}
}
for(int k = 0; k < n; k++){
for(int j = 0; j < m; j++){
array_sum[k][j] = array1[k][j] + array2[k][j];
System.
out.
print (array_sum
[k
][j
] + " "); }
}
}
}
Y2xhc3MgTWFpbnsKCXB1YmxpYyBzdGF0aWMgdm9pZCBtYWluIChTdHJpbmdbXSBhcmdzKSB0aHJvd3MgamF2YS5sYW5nLkV4Y2VwdGlvbiAJewoJCWphdmEudXRpbC5TY2FubmVyIGkgPSBuZXcgamF2YS51dGlsLlNjYW5uZXIoU3lzdGVtLmluKTsKCQlpbnQgbiA9IGkubmV4dEludCgpOwoJCWludCBtID0gaS5uZXh0SW50KCk7CgkJaW50IGFycmF5MVtdW10gPSBuZXcgaW50W25dW21dOwoJCWludCBhcnJheTJbXVtdID0gbmV3IGludFtuXVttXTsKCQlpbnQgYXJyYXlfc3VtW11bXSA9IG5ldyBpbnRbbl1bbV07CgkJZm9yKGludCBrID0gMDsgayA8IG47IGsrKyl7CiAgICAgICAgCWZvcihpbnQgaiA9IDA7IGogPCBtOyBqKyspewogICAgICAgIAkJYXJyYXkxW2tdW2pdID0gaS5uZXh0SW50KCk7CiAgICAJCX0KCQl9CgkJZm9yKGludCBrID0gMDsgayA8IG47IGsrKyl7CiAgICAgICAgCWZvcihpbnQgaiA9IDA7IGogPCBtOyBqKyspewogICAgICAgIAkJYXJyYXkyW2tdW2pdID0gaS5uZXh0SW50KCk7CiAgICAJCX0KCQl9CgkJZm9yKGludCBrID0gMDsgayA8IG47IGsrKyl7CiAgICAgICAgCWZvcihpbnQgaiA9IDA7IGogPCBtOyBqKyspewogICAgICAgIAkJYXJyYXlfc3VtW2tdW2pdID0gYXJyYXkxW2tdW2pdICsgYXJyYXkyW2tdW2pdOwogICAgICAgIAkJU3lzdGVtLm91dC5wcmludCAoYXJyYXlfc3VtW2tdW2pdICsgIiAiKTsKICAgIAkJfQogICAgCQlTeXN0ZW0ub3V0LnByaW50bG4oKTsKCQl9Cgl9Cn0=