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

A = [[0] * m for x in range(n)]

B = [0] * m

counter = 0

while counter < n:

    A[counter] = [int(x) for x in input().split()]

    counter += 1



counter = 0

while counter < m:

    B[counter] = int(input())

    counter += 1



counter = 0

while counter < n:

    result = 0

    for j in range(m):

        result += A[counter][j] * B[j]

    print(result)

    counter += 1
[n, m] = [int(x) for x in input().split()]

A = []



counter = 0

while counter < n:

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

    counter += 1



B = [int(input()) for j in range(m)]



counter = 0

while counter < n:

    result = 0

    for j in range(m):

        result += A[counter][j] * B[j]

    print(result)

    counter += 1
[n, m] = [int(x) for x in input().split()]
A = [[0] * m for x in range(n)]
B = [0] * m
counter = 0
while counter < n:
    A[counter] = [int(x) for x in input().split()]
    counter += 1
counter = 0
while counter < m:
    B[counter] = int(input())
    counter += 1
counter = 0
while counter < n:
    result = 0
    for j in range(m):
        result += A[counter][j] * B[j]
    print(result)
    counter += 1

[n, m] = [int(x) for x in input().split()]
A = []
counter = 0
while counter < n:
    A.append([int(x) for x in input().split()])
    counter += 1
B = [int(input()) for j in range(m)]
counter = 0
while counter < n:
    result = 0
    for j in range(m):
        result += A[counter][j] * B[j]
    print(result)
    counter += 1

-A = [[0] * m for x in range(n)] -B = [0] * m +A = [] -    A[counter] = [int(x) for x in input().split()] +    A.append([int(x) for x in input().split()]) -counter = 0 -while counter < m: -    B[counter] = int(input()) -    counter += 1 +B = [int(input()) for j in range(m)]