import Control.Monad

matrixVectorMultiplication :: Num a => [[a]] -> [a] -> [a]
matrixVectorMultiplication m v = map (sum . zipWith (*) v) m

main :: IO ()
main = do
  [n, m] <- fmap (map read . words) getLine
  mat <- replicateM n $ fmap (map read . words) getLine
  vec <- fmap (map read) (replicateM m getLine)
  mapM_ print (mat `matrixVectorMultiplication` vec)