def f():return list(map(int,input().split()))

n,m = f()

A = [f() for _ in [0]*n]

B = [eval(input()) for _ in [0]*m]

for i in range(n):

  print(sum([A[i][j]*B[j] for j in range(m)]))
def f():return list(map(int,input().split()))

n,m = f()

A = [f() for _ in [0]*n]

B = [int(input()) for _ in [0]*m]

for i in range(n):

  print(sum([A[i][j]*B[j] for j in range(m)]))
def f():
    return list(map(int, input().split()))


n, m = f()
A = [f() for _ in [0] * n]
B = [eval(input()) for _ in [0] * m]
for i in range(n):
    print(sum([A[i][j] * B[j] for j in range(m)]))

def f():
    return list(map(int, input().split()))


n, m = f()
A = [f() for _ in [0] * n]
B = [int(input()) for _ in [0] * m]
for i in range(n):
    print(sum([A[i][j] * B[j] for j in range(m)]))

-B = [eval(input()) for _ in [0] * m] +B = [int(input()) for _ in [0] * m]