import java.util.*;
public class Main {
  public static void main(String[] args) {
      Scanner sc = new Scanner(System.in);
      String line = sc.nextLine();
      String[] linesp = line.split(" ");
      int n = Integer.parseInt(linesp[0]);
      int m = Integer.parseInt(linesp[1]);
      int[][] mat = new int[n][m];
      for(int i = 0; i < n; i++) {
        String line1 = sc.nextLine();
        String[] line1sp = line1.split(" ");
        for(int j = 0; j < m; j++) {
            mat[i][j] = Integer.parseInt(line1sp[j]);
        }
      }
      int[] b = new int[m];
      for(int i = 0; i < m; i++) {
          String line2 = sc.nextLine();
          b[i] = Integer.parseInt(line2);
      }
      
      for(int i = 0; i < n; i++) {
          int ans = 0;
          for(int j = 0; j < m; j++) {
              ans += b[j] * mat[i][j];
          }
          System.out.println(ans);
      }
  }
} import java.util.*; util.* java public class Main {
  public static void main(String[] args) {
      Scanner sc = new Scanner(System.in);
      String line = sc.nextLine();
      String[] linesp = line.split(" ");
      int n = Integer.parseInt(linesp[0]);
      int m = Integer.parseInt(linesp[1]);
      int[][] mat = new int[n][m];
      for(int i = 0; i < n; i++) {
        String line1 = sc.nextLine();
        String[] line1sp = line1.split(" ");
        for(int j = 0; j < m; j++) {
            mat[i][j] = Integer.parseInt(line1sp[j]);
        }
      }
      int[] b = new int[m];
      for(int i = 0; i < m; i++) {
          String line2 = sc.nextLine();
          b[i] = Integer.parseInt(line2);
      }
      
      for(int i = 0; i < n; i++) {
          int ans = 0;
          for(int j = 0; j < m; j++) {
              ans += b[j] * mat[i][j];
          }
          System.out.println(ans);
      }
  }
} Main public static void main(String[] args) {
      Scanner sc = new Scanner(System.in);
      String line = sc.nextLine();
      String[] linesp = line.split(" ");
      int n = Integer.parseInt(linesp[0]);
      int m = Integer.parseInt(linesp[1]);
      int[][] mat = new int[n][m];
      for(int i = 0; i < n; i++) {
        String line1 = sc.nextLine();
        String[] line1sp = line1.split(" ");
        for(int j = 0; j < m; j++) {
            mat[i][j] = Integer.parseInt(line1sp[j]);
        }
      }
      int[] b = new int[m];
      for(int i = 0; i < m; i++) {
          String line2 = sc.nextLine();
          b[i] = Integer.parseInt(line2);
      }
      
      for(int i = 0; i < n; i++) {
          int ans = 0;
          for(int j = 0; j < m; j++) {
              ans += b[j] * mat[i][j];
          }
          System.out.println(ans);
      }
  } main {
      Scanner sc = new Scanner(System.in);
      String line = sc.nextLine();
      String[] linesp = line.split(" ");
      int n = Integer.parseInt(linesp[0]);
      int m = Integer.parseInt(linesp[1]);
      int[][] mat = new int[n][m];
      for(int i = 0; i < n; i++) {
        String line1 = sc.nextLine();
        String[] line1sp = line1.split(" ");
        for(int j = 0; j < m; j++) {
            mat[i][j] = Integer.parseInt(line1sp[j]);
        }
      }
      int[] b = new int[m];
      for(int i = 0; i < m; i++) {
          String line2 = sc.nextLine();
          b[i] = Integer.parseInt(line2);
      }
      
      for(int i = 0; i < n; i++) {
          int ans = 0;
          for(int j = 0; j < m; j++) {
              ans += b[j] * mat[i][j];
          }
          System.out.println(ans);
      }
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String line = sc.nextLine(); line sc.nextLine() sc.nextLine sc String[] linesp = line.split(" "); linesp line.split(" ") line.split line " " int n = Integer.parseInt(linesp[0]); n Integer.parseInt(linesp[0]) Integer.parseInt Integer linesp[0] linesp 0 int m = Integer.parseInt(linesp[1]); m Integer.parseInt(linesp[1]) Integer.parseInt Integer linesp[1] linesp 1 int[][] mat = new int[n][m]; mat new int[n][m] n m for(int i = 0; i < n; i++) {
        String line1 = sc.nextLine();
        String[] line1sp = line1.split(" ");
        for(int j = 0; j < m; j++) {
            mat[i][j] = Integer.parseInt(line1sp[j]);
        }
      } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
        String line1 = sc.nextLine();
        String[] line1sp = line1.split(" ");
        for(int j = 0; j < m; j++) {
            mat[i][j] = Integer.parseInt(line1sp[j]);
        }
      } {
        String line1 = sc.nextLine();
        String[] line1sp = line1.split(" ");
        for(int j = 0; j < m; j++) {
            mat[i][j] = Integer.parseInt(line1sp[j]);
        }
      } String line1 = sc.nextLine(); line1 sc.nextLine() sc.nextLine sc String[] line1sp = line1.split(" "); line1sp line1.split(" ") line1.split line1 " " for(int j = 0; j < m; j++) {
            mat[i][j] = Integer.parseInt(line1sp[j]);
        } int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
            mat[i][j] = Integer.parseInt(line1sp[j]);
        } {
            mat[i][j] = Integer.parseInt(line1sp[j]);
        } mat[i][j] = Integer.parseInt(line1sp[j]) mat[i][j] mat[i] mat i j Integer.parseInt(line1sp[j]) Integer.parseInt Integer line1sp[j] line1sp j int[] b = new int[m]; b new int[m] m for(int i = 0; i < m; i++) {
          String line2 = sc.nextLine();
          b[i] = Integer.parseInt(line2);
      } int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
          String line2 = sc.nextLine();
          b[i] = Integer.parseInt(line2);
      } {
          String line2 = sc.nextLine();
          b[i] = Integer.parseInt(line2);
      } String line2 = sc.nextLine(); line2 sc.nextLine() sc.nextLine sc b[i] = Integer.parseInt(line2) b[i] b i Integer.parseInt(line2) Integer.parseInt Integer line2 for(int i = 0; i < n; i++) {
          int ans = 0;
          for(int j = 0; j < m; j++) {
              ans += b[j] * mat[i][j];
          }
          System.out.println(ans);
      } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
          int ans = 0;
          for(int j = 0; j < m; j++) {
              ans += b[j] * mat[i][j];
          }
          System.out.println(ans);
      } {
          int ans = 0;
          for(int j = 0; j < m; j++) {
              ans += b[j] * mat[i][j];
          }
          System.out.println(ans);
      } int ans = 0; ans 0 for(int j = 0; j < m; j++) {
              ans += b[j] * mat[i][j];
          } int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
              ans += b[j] * mat[i][j];
          } {
              ans += b[j] * mat[i][j];
          } ans += b[j] * mat[i][j] ans b[j] * mat[i][j] b[j] b j mat[i][j] mat[i] mat i j System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {
  public static void main(String[] args) {
      Scanner sc = new Scanner(System.in);
      String line = sc.nextLine();
      String[] linesp = line.split(" ");
      int n = Integer.parseInt(linesp[0]);
      int m = Integer.parseInt(linesp[1]);
      int[][] mat = new int[n][m];
      for(int i = 0; i < n; i++) {
        String line1 = sc.nextLine();
        String[] line1sp = line1.split(" ");
        for(int j = 0; j < m; j++) {
            mat[i][j] = Integer.parseInt(line1sp[j]);
        }
      }
      int[] b = new int[m];
      for(int i = 0; i < m; i++) {
          String line2 = sc.nextLine();
          b[i] = Integer.parseInt(line2);
      }
      
      for(int i = 0; i < n; i++) {
          int ans = 0;
          for(int j = 0; j < m; j++) {
              ans += b[j] * mat[i][j];
          }
          System.out.println(ans);
      }
  }
} public class Main {
  public static void main(String[] args) {
      Scanner sc = new Scanner(System.in);
      String line = sc.nextLine();
      String[] linesp = line.split(" ");
      int n = Integer.parseInt(linesp[0]);
      int m = Integer.parseInt(linesp[1]);
      int[][] mat = new int[n][m];
      for(int i = 0; i < n; i++) {
        String line1 = sc.nextLine();
        String[] line1sp = line1.split(" ");
        for(int j = 0; j < m; j++) {
            mat[i][j] = Integer.parseInt(line1sp[j]);
        }
      }
      int[] b = new int[m];
      for(int i = 0; i < m; i++) {
          String line2 = sc.nextLine();
          b[i] = Integer.parseInt(line2);
      }
      
      for(int i = 0; i < n; i++) {
          int ans = 0;
          for(int j = 0; j < m; j++) {
              ans += b[j] * mat[i][j];
          }
          System.out.println(ans);
      }
  }
} Main
import java.util.*;
public class Main {
  public static void main(String[] args) {
      Scanner sc = new Scanner(System.in);
      String line = sc.nextLine();
      String[] linesp = line.split(" ");
      int n = Integer.parseInt(linesp[0]);
      int m = Integer.parseInt(linesp[1]);
      int[][] mat = new int[n][m];
      for(int i = 0; i < n; i++) {
        String line1 = sc.nextLine();
        String[] line1sp = line1.split(" ");
        for(int j = 0; j < m; j++) {
            mat[i][j] = Integer.parseInt(line1sp[j]);
        }
      }
      int[] b = new int[m];
      for(int i = 0; i < m; i++) {
          String line2 = sc.nextLine();
          b[i] = Integer.parseInt(line2);
      }
      
      for(int i = 0; i < n; i++) {
          int ans = 0;
          for(int j = 0; j < m; j++) {
              ans += b[j] * mat[i][j];
          }
          System.out.println(ans);
      }
  }
}
