The theater has rows with seats. Two matrices are given. The first matrix contains the ticket prices for each seat. The second matrix tells which tickets are sold and which are not ( means the ticket is sold for a corresponding seat, is not sold).
Determine the total revenue from the performance.
The first line contains and . Then the matrix with ticket prices is given ( lines with numbers, each number ranges from to ). Then given the matrix of sold tickets — lines with numbers.
Print the total revenue from the ticket sales.