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

matrix = []

vector = []

for _ in range(n):

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

for _ in range(m):

    vector.append(int(eval(input())))

for row in matrix:

    product = 0

    for i, e in enumerate(row):

        product += e * vector[i]

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

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

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

for r in M:

    print((sum(x*y for x, y in zip(r, V))))
n, m = list(map(int, input().split()))
matrix = []
vector = []
for _ in range(n):
    matrix.append(list(map(int, input().split())))
for _ in range(m):
    vector.append(int(eval(input())))
for row in matrix:
    product = 0
    for i, e in enumerate(row):
        product += e * vector[i]
    print(product)

n, m = list(map(int, input().split()))
M = [list(map(int, input().split())) for _ in range(n)]
V = [int(eval(input())) for _ in range(m)]
for r in M:
    print((sum(x * y for x, y in zip(r, V))))

-matrix = [] -vector = [] -for _ in range(n): -    matrix.append(list(map(int, input().split()))) -for _ in range(m): -    vector.append(int(eval(input()))) -for row in matrix: -    product = 0 -    for i, e in enumerate(row): -        product += e * vector[i] -    print(product) +M = [list(map(int, input().split())) for _ in range(n)] +V = [int(eval(input())) for _ in range(m)] +for r in M: +    print((sum(x * y for x, y in zip(r, V))))