import Control.Monad

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

(|*) :: Matrix -> Vector -> Vector
m |* v = [sum $ zipWith (*) mi v | mi <- m]

getList :: Read a => IO [a]
getList = fmap (map read . words) getLine

main = do
  [m, n] <- getList
  mat <- replicateM m getList
  vec <- replicateM n readLn
  mapM_ putStrLn $ map show $ mat |* vec