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



A = []

for i in range(n):

    A.append(list(map(int, input().split())))



b = [0] * m

for i in range(m):

    b[i] = int(eval(input()))



c = [0] * n

for i in range(n):

    for j in range(m):

        c[i] += A[i][j] * b[j]

    print((c[i]))
n,m = list(map(int, input().split()))



A = []

for i in range(n):

    A.append(list(map(int, input().split())))



b = [0] * m

for i in range(m):

    b[i] = int(eval(input()))



from operator import mul

for i in range(n):

    print((sum(map(mul, A[i], b))))
n, m = list(map(int, input().split()))
A = []
for i in range(n):
    A.append(list(map(int, input().split())))
b = [0] * m
for i in range(m):
    b[i] = int(eval(input()))
c = [0] * n
for i in range(n):
    for j in range(m):
        c[i] += A[i][j] * b[j]
    print((c[i]))

n, m = list(map(int, input().split()))
A = []
for i in range(n):
    A.append(list(map(int, input().split())))
b = [0] * m
for i in range(m):
    b[i] = int(eval(input()))
from operator import mul

for i in range(n):
    print((sum(map(mul, A[i], b))))

-c = [0] * n +from operator import mul + -    for j in range(m): -        c[i] += A[i][j] * b[j] -    print((c[i])) +    print((sum(map(mul, A[i], b))))