import java.util.Scanner;

public class Main {
  public static void main(String[] args) {
    Scanner s = new Scanner(System.in);
    int n = s.nextInt();
    int m = s.nextInt();
    int[][] mat = new int[n][m];
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < m; j++) {
        mat[i][j] = s.nextInt();
      }
    }
    int[] vec = new int[m];
    for (int i = 0; i < m; i++) {
      vec[i] = s.nextInt();
    }
    s.close();
    for (int i = 0; i < n; i++) {
      int sum = 0;
      for (int j = 0; j < m; j++) {
        sum += mat[i][j] * vec[j];
      }
      System.out.println(sum);
    }
  }
}
 import java.util.Scanner; Scanner java.util public class Main {
  public static void main(String[] args) {
    Scanner s = new Scanner(System.in);
    int n = s.nextInt();
    int m = s.nextInt();
    int[][] mat = new int[n][m];
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < m; j++) {
        mat[i][j] = s.nextInt();
      }
    }
    int[] vec = new int[m];
    for (int i = 0; i < m; i++) {
      vec[i] = s.nextInt();
    }
    s.close();
    for (int i = 0; i < n; i++) {
      int sum = 0;
      for (int j = 0; j < m; j++) {
        sum += mat[i][j] * vec[j];
      }
      System.out.println(sum);
    }
  }
} Main public static void main(String[] args) {
    Scanner s = new Scanner(System.in);
    int n = s.nextInt();
    int m = s.nextInt();
    int[][] mat = new int[n][m];
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < m; j++) {
        mat[i][j] = s.nextInt();
      }
    }
    int[] vec = new int[m];
    for (int i = 0; i < m; i++) {
      vec[i] = s.nextInt();
    }
    s.close();
    for (int i = 0; i < n; i++) {
      int sum = 0;
      for (int j = 0; j < m; j++) {
        sum += mat[i][j] * vec[j];
      }
      System.out.println(sum);
    }
  } main {
    Scanner s = new Scanner(System.in);
    int n = s.nextInt();
    int m = s.nextInt();
    int[][] mat = new int[n][m];
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < m; j++) {
        mat[i][j] = s.nextInt();
      }
    }
    int[] vec = new int[m];
    for (int i = 0; i < m; i++) {
      vec[i] = s.nextInt();
    }
    s.close();
    for (int i = 0; i < n; i++) {
      int sum = 0;
      for (int j = 0; j < m; j++) {
        sum += mat[i][j] * vec[j];
      }
      System.out.println(sum);
    }
  } Scanner s = new Scanner(System.in); s new Scanner(System.in) int n = s.nextInt(); n s.nextInt() s.nextInt s int m = s.nextInt(); m s.nextInt() s.nextInt s int[][] mat = new int[n][m]; mat new int[n][m] n m for (int i = 0; i < n; i++) {
      for (int j = 0; j < m; j++) {
        mat[i][j] = s.nextInt();
      }
    } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
      for (int j = 0; j < m; j++) {
        mat[i][j] = s.nextInt();
      }
    } {
      for (int j = 0; j < m; j++) {
        mat[i][j] = s.nextInt();
      }
    } for (int j = 0; j < m; j++) {
        mat[i][j] = s.nextInt();
      } int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
        mat[i][j] = s.nextInt();
      } {
        mat[i][j] = s.nextInt();
      } mat[i][j] = s.nextInt() mat[i][j] mat[i] mat i j s.nextInt() s.nextInt s int[] vec = new int[m]; vec new int[m] m for (int i = 0; i < m; i++) {
      vec[i] = s.nextInt();
    } int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
      vec[i] = s.nextInt();
    } {
      vec[i] = s.nextInt();
    } vec[i] = s.nextInt() vec[i] vec i s.nextInt() s.nextInt s s.close() s.close s for (int i = 0; i < n; i++) {
      int sum = 0;
      for (int j = 0; j < m; j++) {
        sum += mat[i][j] * vec[j];
      }
      System.out.println(sum);
    } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
      int sum = 0;
      for (int j = 0; j < m; j++) {
        sum += mat[i][j] * vec[j];
      }
      System.out.println(sum);
    } {
      int sum = 0;
      for (int j = 0; j < m; j++) {
        sum += mat[i][j] * vec[j];
      }
      System.out.println(sum);
    } int sum = 0; sum 0 for (int j = 0; j < m; j++) {
        sum += mat[i][j] * vec[j];
      } int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
        sum += mat[i][j] * vec[j];
      } {
        sum += mat[i][j] * vec[j];
      } sum += mat[i][j] * vec[j] sum mat[i][j] * vec[j] mat[i][j] mat[i] mat i j vec[j] vec j System.out.println(sum) System.out.println System.out System System.out sum String[] args args public class Main {
  public static void main(String[] args) {
    Scanner s = new Scanner(System.in);
    int n = s.nextInt();
    int m = s.nextInt();
    int[][] mat = new int[n][m];
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < m; j++) {
        mat[i][j] = s.nextInt();
      }
    }
    int[] vec = new int[m];
    for (int i = 0; i < m; i++) {
      vec[i] = s.nextInt();
    }
    s.close();
    for (int i = 0; i < n; i++) {
      int sum = 0;
      for (int j = 0; j < m; j++) {
        sum += mat[i][j] * vec[j];
      }
      System.out.println(sum);
    }
  }
} public class Main {
  public static void main(String[] args) {
    Scanner s = new Scanner(System.in);
    int n = s.nextInt();
    int m = s.nextInt();
    int[][] mat = new int[n][m];
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < m; j++) {
        mat[i][j] = s.nextInt();
      }
    }
    int[] vec = new int[m];
    for (int i = 0; i < m; i++) {
      vec[i] = s.nextInt();
    }
    s.close();
    for (int i = 0; i < n; i++) {
      int sum = 0;
      for (int j = 0; j < m; j++) {
        sum += mat[i][j] * vec[j];
      }
      System.out.println(sum);
    }
  }
} Main
import java.util.Scanner;

public class Main {
  public static void main(String[] args) {
    Scanner s = new Scanner(System.in);
    int n = s.nextInt();
    int m = s.nextInt();
    int[][] mat = new int[n][m];
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < m; j++) {
        mat[i][j] = s.nextInt();
      }
    }
    int[] vec = new int[m];
    for (int i = 0; i < m; i++) {
      vec[i] = s.nextInt();
    }
    s.close();
    for (int i = 0; i < n; i++) {
      int sum = 0;
      for (int j = 0; j < m; j++) {
        sum += mat[i][j] * vec[j];
      }
      System.out.println(sum);
    }
  }
}

