import Control.Monad
import Control.Applicative
mMulV m v = map calcEachLine m where
    calcEachLine l = sum $ zipWith (*) l v
main = do
    [n,m] <- map read . words <$> getLine
    matrix <- replicateM n $ map (read :: String->Int) . words <$> getLine :: IO [[Int]]
    vector <- replicateM m $ (read :: String->Int) <$> getLine :: IO [Int]
    mapM_ print $ mMulV matrix vector