The input consist of several cases, please deal with till the end of file. Each case contains two integers N and M (0 < N, M <= 100), representing there are N kinds of tools and M people. Second line there are N integers, N(i) means the boss own Ni number of ith tool(equal to the number of tools Small JH need).Then follow M lines, each consisting N integers, the number in ith row and jth column means the amount of the jth tools that the ith people need. After it there also M lines, each line has N integers too, the number in ith row and jth column means this amount of jth tools have been allotted to the ith people.
The total number of ith tool that all people own will not bigger than boss own at first.