import Control.Monad
import Control.Applicative

type Vector = [Int]
type Matrix = [[Int]]


productV :: Vector -> Vector -> Int
productV [] _ = 0
productV _ [] = 0
productV (x:xs) (y:ys) = x * y + productV xs ys

solver :: Matrix -> Vector -> Vector
solver _ [] = []
solver [] _ = []
solver (x:xs) v = productV x v : solver xs v

main :: IO()
main = do
  (n:m:_) <- map (read :: String -> Int) . words <$> getLine
  mat <- map (map (read :: String -> Int) . words) <$> replicateM n getLine
  vec <- map (read :: String -> Int) <$> replicateM m getLine
  mapM_ print $ solver mat vec