Pratik is a huge fan of The Matrix. He says he can perform matrix operations in his mind. So to test this his friend rohit gave him two matrices A(pxq) and B(qxr), he asked pratik to multiply these matrices and calculate sum of each row and each column and give the highest of these numbers as answer.
Score = max(0, x), where x=(800−num of characters in code)8
INPUT:
first line of input contains two space separated integers denoting p and q.
each of the next p lines contains q space separated integers
next line of input contains two space separated integers denoting q and r.
each of the next q lines contains r space separated integers
OUTPUT:
print the maximum of sum of each row and each column.
CONSTRAINTS:
0<=Aij,Bij<=99
3<=p,q,r<=100
for the sample input:
matrix after multiplication is
51 69 87
34 44 54
63 78 93
row sums: 207 132 234
column sums: 148 191 234
highest of these is 234