CodeLab Academy 📞 9936 6696
← List Python · Level 8: Nested loops Code · 80 points ← #752 #754 →

#753. Sum of two matrices

You are given two matrices of the same size. Print their sum. ### Input The first line has n m (the number of rows and columns), each of the next n lines has m integers. Then the n lines of the second matrix. ### Output n lines.

Examples

Input
2 4
-4 7 -2 9
3 -1 5 2
9 0 3 5
-1 0 -9 2
Output
5 7 1 14
2 -1 -4 4
Input
4 4
-3 -4 -3 -5
-4 1 -4 -6
8 -2 0 -6
0 -8 9 2
-4 -5 8 3
-3 3 -3 0
2 -4 7 -9
-4 -3 8 0
Output
-7 -9 5 -2
-7 4 -7 -6
10 -6 7 -15
-4 -11 17 2

💡 You can solve it with Python, JavaScript or blocks. Read the input line by line with input(). Don't print a question (like input("Number: ")). Print exactly what the output asks for, nothing more.

🔒 You can solve the first 3 problems without an account. Sign up for free to solve this one!