import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
 
public class Main{

  public static void main(String[] args) throws IOException {
    try ( BufferedReader br = new BufferedReader(new InputStreamReader(System.in)) ) {

      String[] lines = br.readLine().split(" ");
      int n = Integer.parseInt(lines[0]);
      int m = Integer.parseInt(lines[1]);
      int[][] mA = new int[n][m];
      int[]   vb = new int[m];
      int[]   vc = new int[n];

      for(int i = 0; i < n; i++ ) {
        lines = br.readLine().split(" ");
        for( int j = 0; j < m; j++ ) {
          mA[i][j] = Integer.parseInt(lines[j]);
        }
      }
      for( int i = 0; i < m; i++ ) {
        lines = br.readLine().split(" ");
        vb[i] = Integer.parseInt(lines[0]);
      }

      for( int i = 0; i < n; i++ ) {
        for( int j = 0; j < m; j++ ){
          vc[i] += mA[i][j] * vb[j];
        }
        System.out.println(vc[i]);
      }
    }
  }
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.Arrays; Arrays java.util public class Main{

  public static void main(String[] args) throws IOException {
    try ( BufferedReader br = new BufferedReader(new InputStreamReader(System.in)) ) {

      String[] lines = br.readLine().split(" ");
      int n = Integer.parseInt(lines[0]);
      int m = Integer.parseInt(lines[1]);
      int[][] mA = new int[n][m];
      int[]   vb = new int[m];
      int[]   vc = new int[n];

      for(int i = 0; i < n; i++ ) {
        lines = br.readLine().split(" ");
        for( int j = 0; j < m; j++ ) {
          mA[i][j] = Integer.parseInt(lines[j]);
        }
      }
      for( int i = 0; i < m; i++ ) {
        lines = br.readLine().split(" ");
        vb[i] = Integer.parseInt(lines[0]);
      }

      for( int i = 0; i < n; i++ ) {
        for( int j = 0; j < m; j++ ){
          vc[i] += mA[i][j] * vb[j];
        }
        System.out.println(vc[i]);
      }
    }
  }
} Main public static void main(String[] args) throws IOException {
    try ( BufferedReader br = new BufferedReader(new InputStreamReader(System.in)) ) {

      String[] lines = br.readLine().split(" ");
      int n = Integer.parseInt(lines[0]);
      int m = Integer.parseInt(lines[1]);
      int[][] mA = new int[n][m];
      int[]   vb = new int[m];
      int[]   vc = new int[n];

      for(int i = 0; i < n; i++ ) {
        lines = br.readLine().split(" ");
        for( int j = 0; j < m; j++ ) {
          mA[i][j] = Integer.parseInt(lines[j]);
        }
      }
      for( int i = 0; i < m; i++ ) {
        lines = br.readLine().split(" ");
        vb[i] = Integer.parseInt(lines[0]);
      }

      for( int i = 0; i < n; i++ ) {
        for( int j = 0; j < m; j++ ){
          vc[i] += mA[i][j] * vb[j];
        }
        System.out.println(vc[i]);
      }
    }
  } main {
    try ( BufferedReader br = new BufferedReader(new InputStreamReader(System.in)) ) {

      String[] lines = br.readLine().split(" ");
      int n = Integer.parseInt(lines[0]);
      int m = Integer.parseInt(lines[1]);
      int[][] mA = new int[n][m];
      int[]   vb = new int[m];
      int[]   vc = new int[n];

      for(int i = 0; i < n; i++ ) {
        lines = br.readLine().split(" ");
        for( int j = 0; j < m; j++ ) {
          mA[i][j] = Integer.parseInt(lines[j]);
        }
      }
      for( int i = 0; i < m; i++ ) {
        lines = br.readLine().split(" ");
        vb[i] = Integer.parseInt(lines[0]);
      }

      for( int i = 0; i < n; i++ ) {
        for( int j = 0; j < m; j++ ){
          vc[i] += mA[i][j] * vb[j];
        }
        System.out.println(vc[i]);
      }
    }
  } try ( BufferedReader br = new BufferedReader(new InputStreamReader(System.in)) ) {

      String[] lines = br.readLine().split(" ");
      int n = Integer.parseInt(lines[0]);
      int m = Integer.parseInt(lines[1]);
      int[][] mA = new int[n][m];
      int[]   vb = new int[m];
      int[]   vc = new int[n];

      for(int i = 0; i < n; i++ ) {
        lines = br.readLine().split(" ");
        for( int j = 0; j < m; j++ ) {
          mA[i][j] = Integer.parseInt(lines[j]);
        }
      }
      for( int i = 0; i < m; i++ ) {
        lines = br.readLine().split(" ");
        vb[i] = Integer.parseInt(lines[0]);
      }

      for( int i = 0; i < n; i++ ) {
        for( int j = 0; j < m; j++ ){
          vc[i] += mA[i][j] * vb[j];
        }
        System.out.println(vc[i]);
      }
    } {

      String[] lines = br.readLine().split(" ");
      int n = Integer.parseInt(lines[0]);
      int m = Integer.parseInt(lines[1]);
      int[][] mA = new int[n][m];
      int[]   vb = new int[m];
      int[]   vc = new int[n];

      for(int i = 0; i < n; i++ ) {
        lines = br.readLine().split(" ");
        for( int j = 0; j < m; j++ ) {
          mA[i][j] = Integer.parseInt(lines[j]);
        }
      }
      for( int i = 0; i < m; i++ ) {
        lines = br.readLine().split(" ");
        vb[i] = Integer.parseInt(lines[0]);
      }

      for( int i = 0; i < n; i++ ) {
        for( int j = 0; j < m; j++ ){
          vc[i] += mA[i][j] * vb[j];
        }
        System.out.println(vc[i]);
      }
    } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)) BufferedReader br = new BufferedReader(new InputStreamReader(System.in)) new BufferedReader(new InputStreamReader(System.in)) String[] lines = br.readLine().split(" "); lines br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " int n = Integer.parseInt(lines[0]); n Integer.parseInt(lines[0]) Integer.parseInt Integer lines[0] lines 0 int m = Integer.parseInt(lines[1]); m Integer.parseInt(lines[1]) Integer.parseInt Integer lines[1] lines 1 int[][] mA = new int[n][m]; mA new int[n][m] n m int[]   vb = new int[m]; vb new int[m] m int[]   vc = new int[n]; vc new int[n] n for(int i = 0; i < n; i++ ) {
        lines = br.readLine().split(" ");
        for( int j = 0; j < m; j++ ) {
          mA[i][j] = Integer.parseInt(lines[j]);
        }
      } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
        lines = br.readLine().split(" ");
        for( int j = 0; j < m; j++ ) {
          mA[i][j] = Integer.parseInt(lines[j]);
        }
      } {
        lines = br.readLine().split(" ");
        for( int j = 0; j < m; j++ ) {
          mA[i][j] = Integer.parseInt(lines[j]);
        }
      } lines = br.readLine().split(" ") lines br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " for( int j = 0; j < m; j++ ) {
          mA[i][j] = Integer.parseInt(lines[j]);
        } int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
          mA[i][j] = Integer.parseInt(lines[j]);
        } {
          mA[i][j] = Integer.parseInt(lines[j]);
        } mA[i][j] = Integer.parseInt(lines[j]) mA[i][j] mA[i] mA i j Integer.parseInt(lines[j]) Integer.parseInt Integer lines[j] lines j for( int i = 0; i < m; i++ ) {
        lines = br.readLine().split(" ");
        vb[i] = Integer.parseInt(lines[0]);
      } int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
        lines = br.readLine().split(" ");
        vb[i] = Integer.parseInt(lines[0]);
      } {
        lines = br.readLine().split(" ");
        vb[i] = Integer.parseInt(lines[0]);
      } lines = br.readLine().split(" ") lines br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " vb[i] = Integer.parseInt(lines[0]) vb[i] vb i Integer.parseInt(lines[0]) Integer.parseInt Integer lines[0] lines 0 for( int i = 0; i < n; i++ ) {
        for( int j = 0; j < m; j++ ){
          vc[i] += mA[i][j] * vb[j];
        }
        System.out.println(vc[i]);
      } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
        for( int j = 0; j < m; j++ ){
          vc[i] += mA[i][j] * vb[j];
        }
        System.out.println(vc[i]);
      } {
        for( int j = 0; j < m; j++ ){
          vc[i] += mA[i][j] * vb[j];
        }
        System.out.println(vc[i]);
      } for( int j = 0; j < m; j++ ){
          vc[i] += mA[i][j] * vb[j];
        } int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
          vc[i] += mA[i][j] * vb[j];
        } {
          vc[i] += mA[i][j] * vb[j];
        } vc[i] += mA[i][j] * vb[j] vc[i] vc i mA[i][j] * vb[j] mA[i][j] mA[i] mA i j vb[j] vb j System.out.println(vc[i]) System.out.println System.out System System.out vc[i] vc i String[] args args public class Main{

  public static void main(String[] args) throws IOException {
    try ( BufferedReader br = new BufferedReader(new InputStreamReader(System.in)) ) {

      String[] lines = br.readLine().split(" ");
      int n = Integer.parseInt(lines[0]);
      int m = Integer.parseInt(lines[1]);
      int[][] mA = new int[n][m];
      int[]   vb = new int[m];
      int[]   vc = new int[n];

      for(int i = 0; i < n; i++ ) {
        lines = br.readLine().split(" ");
        for( int j = 0; j < m; j++ ) {
          mA[i][j] = Integer.parseInt(lines[j]);
        }
      }
      for( int i = 0; i < m; i++ ) {
        lines = br.readLine().split(" ");
        vb[i] = Integer.parseInt(lines[0]);
      }

      for( int i = 0; i < n; i++ ) {
        for( int j = 0; j < m; j++ ){
          vc[i] += mA[i][j] * vb[j];
        }
        System.out.println(vc[i]);
      }
    }
  }
} public class Main{

  public static void main(String[] args) throws IOException {
    try ( BufferedReader br = new BufferedReader(new InputStreamReader(System.in)) ) {

      String[] lines = br.readLine().split(" ");
      int n = Integer.parseInt(lines[0]);
      int m = Integer.parseInt(lines[1]);
      int[][] mA = new int[n][m];
      int[]   vb = new int[m];
      int[]   vc = new int[n];

      for(int i = 0; i < n; i++ ) {
        lines = br.readLine().split(" ");
        for( int j = 0; j < m; j++ ) {
          mA[i][j] = Integer.parseInt(lines[j]);
        }
      }
      for( int i = 0; i < m; i++ ) {
        lines = br.readLine().split(" ");
        vb[i] = Integer.parseInt(lines[0]);
      }

      for( int i = 0; i < n; i++ ) {
        for( int j = 0; j < m; j++ ){
          vc[i] += mA[i][j] * vb[j];
        }
        System.out.println(vc[i]);
      }
    }
  }
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
 
public class Main{

  public static void main(String[] args) throws IOException {
    try ( BufferedReader br = new BufferedReader(new InputStreamReader(System.in)) ) {

      String[] lines = br.readLine().split(" ");
      int n = Integer.parseInt(lines[0]);
      int m = Integer.parseInt(lines[1]);
      int[][] mA = new int[n][m];
      int[]   vb = new int[m];
      int[]   vc = new int[n];

      for(int i = 0; i < n; i++ ) {
        lines = br.readLine().split(" ");
        for( int j = 0; j < m; j++ ) {
          mA[i][j] = Integer.parseInt(lines[j]);
        }
      }
      for( int i = 0; i < m; i++ ) {
        lines = br.readLine().split(" ");
        vb[i] = Integer.parseInt(lines[0]);
      }

      for( int i = 0; i < n; i++ ) {
        for( int j = 0; j < m; j++ ){
          vc[i] += mA[i][j] * vb[j];
        }
        System.out.println(vc[i]);
      }
    }
  }
}
