# coding=utf-8



A = []

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

for _ in range(n):

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

# print A



b = []

for _ in range(m):

    b.append(eval(input()))

# print b



Ab = [sum([A[i][j] * b[j] for j in range(m)]) for i in range(n)]

# print Ab

for x in Ab:

    print(x)
# coding=utf-8



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

A = [list(map(int, input().split())) for _ in range(n)]

b = [eval(input()) for _ in range(m)]

Ab = [sum([A[i][j] * b[j] for j in range(m)]) for i in range(n)]

for x in Ab:

    print(x)
# coding=utf-8
A = []
n, m = list(map(int, input().split()))
for _ in range(n):
    A.append(list(map(int, input().split())))
# print A
b = []
for _ in range(m):
    b.append(eval(input()))
# print b
Ab = [sum([A[i][j] * b[j] for j in range(m)]) for i in range(n)]
# print Ab
for x in Ab:
    print(x)

# coding=utf-8
n, m = list(map(int, input().split()))
A = [list(map(int, input().split())) for _ in range(n)]
b = [eval(input()) for _ in range(m)]
Ab = [sum([A[i][j] * b[j] for j in range(m)]) for i in range(n)]
for x in Ab:
    print(x)

-A = [] -for _ in range(n): -    A.append(list(map(int, input().split()))) -# print A -b = [] -for _ in range(m): -    b.append(eval(input())) -# print b +A = [list(map(int, input().split())) for _ in range(n)] +b = [eval(input()) for _ in range(m)] -# print Ab