(n, m) = [int(i) for i in input().split()]

A = []

b = []

for i in range(n):

    A.append([int(j) for j in input().split()])



for i in range(m):

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



for i in range(n):

    s = 0

    for j in range(m):

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

    print(s)
n, m = [int(i) for i in input().split()]



matrix = []

for ni in range(n):

    matrix.append([int(a) for a in input().split()])



vector = []

for mi in range(m):

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



for ni in range(n):

    sum = 0

    for mi in range(m):

        sum += matrix[ni][mi] * vector[mi]



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

n, m = [int(i) for i in input().split()]
matrix = []
for ni in range(n):
    matrix.append([int(a) for a in input().split()])
vector = []
for mi in range(m):
    vector.append(int(eval(input())))
for ni in range(n):
    sum = 0
    for mi in range(m):
        sum += matrix[ni][mi] * vector[mi]
    print(sum)

-(n, m) = [int(i) for i in input().split()] -A = [] -b = [] -for i in range(n): -    A.append([int(j) for j in input().split()]) -for i in range(m): -    b.append(int(eval(input()))) -for i in range(n): -    s = 0 -    for j in range(m): -        s += A[i][j] * b[j] -    print(s) +n, m = [int(i) for i in input().split()] +matrix = [] +for ni in range(n): +    matrix.append([int(a) for a in input().split()]) +vector = [] +for mi in range(m): +    vector.append(int(eval(input()))) +for ni in range(n): +    sum = 0 +    for mi in range(m): +        sum += matrix[ni][mi] * vector[mi] +    print(sum)