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

#754. Largest of two matrices, element by element

You are given two matrices of the same size. Print the matrix that has the larger of the two values at each position. ### 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
3 2
6 -6
-7 -2
3 0
-8 7
-1 8
5 -7
Output
6 7
-1 8
5 0
Input
3 2
-8 -5
-6 -3
-4 0
8 -5
-5 2
9 0
Output
8 -5
-5 2
9 0

💡 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!