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



A = []

for i in range(n):

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



b = []

for i in range(m):

    b.append(int(eval(input())))



c = []



for i in range(n):

    tmp = 0

    for j in range(m):

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

    c.append(tmp)



for i in range(n):

    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()))



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 = []
for i in range(m):
    b.append(int(eval(input())))
c = []
for i in range(n):
    tmp = 0
    for j in range(m):
        tmp += A[i][j] * b[j]
    c.append(tmp)
for i in range(n):
    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()))
c = [0] * n
for i in range(n):
    for j in range(m):
        c[i] += A[i][j] * b[j]
    print((c[i]))

-b = [] +b = [0] * m -    b.append(int(eval(input()))) -c = [] +    b[i] = int(eval(input())) +c = [0] * n -    tmp = 0 -        tmp += A[i][j] * b[j] -    c.append(tmp) -for i in range(n): +        c[i] += A[i][j] * b[j]