
(m,n)=  map(int,input().split())

l = []
for i in range(0,m):
    l.append(list(map(int,input().split())))

l2 = []
for i in range(0,n):
    l2.append(int(input()))


for i in range(0,m):
    sum = 0
    for j in range(0,n):
        sum += l[i][j] * l2[j]
    print (sum)
ac3daffa6722b9dfcdcc379835bc8805c3554eab
<mask token>

<mask token>
for i in range(0, m):
    l.append(list(map(int, input().split())))
<mask token>
for i in range(0, n):
    l2.append(int(input()))
for i in range(0, m):
    sum = 0
    for j in range(0, n):
        sum += l[i][j] * l2[j]
    print(sum)

m, n = map(int, input().split())
l = []
for i in range(0, m):
    l.append(list(map(int, input().split())))
l2 = []
for i in range(0, n):
    l2.append(int(input()))
for i in range(0, m):
    sum = 0
    for j in range(0, n):
        sum += l[i][j] * l2[j]
    print(sum)


(m,n)=  map(int,input().split())

l = []
for i in range(0,m):
    l.append(list(map(int,input().split())))

l2 = []
for i in range(0,n):
    l2.append(int(input()))


for i in range(0,m):
    sum = 0
    for j in range(0,n):
        sum += l[i][j] * l2[j]
    print (sum)