e-olymp
favorite We need a little bit of your help to keep things running, click on this banner to learn more
Competitions

Week 12: February 8 - 14

Sum of matrices

Given two matrices A and B. Find their sum C = A + B.

Input

First line contains the size of matrices n and m (1n, m100). Each of the next n lines contains m integers and describe matrix A. Then empty line is given, after which the description of matrix B is given in the same format.

Output

Print the matrix С: n rows, each with m integers.

Time limit 1 second
Memory limit 128 MiB
Input example #1
3 4
3 4 5 6
1 2 3 4
7 6 5 4

0 0 -3 -2
-1 3 4 5
5 6 1 2
Output example #1
3 4 2 4 
0 5 7 9 
12 12 6 6 
Author Michael Medvedev