import java.util.Scanner;
 
class Main{
  public static void main(String[] arg){
    int rows,cols;
    int [][] a,b,c;

    Scanner in = new Scanner(System.in);

    rows = in.nextInt();
    cols = in.nextInt();

    a = new int[rows][cols];
    b = new int[cols][1];
    c = new int[rows][1];
    in.nextLine();

    for(int i=0; i<a.length; i++){
        for(int j=0; j<a[0].length; j++){
            a[i][j] = in.nextInt();
        }
        in.nextLine();
    }

    for(int i=0; i<b.length; i++){
        b[i][0] = in.nextInt();
        in.nextLine();
    }

    for(int i=0; i<a.length; i++){
        int tmp = 0;
        for(int j=0; j<a[0].length; j++)
            tmp += a[i][j]*b[j][0];
        c[i][0] = tmp;
    }

    for(int i=0; i<c.length; i++){
        System.out.println(c[i][0]);
    }
  }
} import java.util.Scanner; Scanner java.util class Main{
  public static void main(String[] arg){
    int rows,cols;
    int [][] a,b,c;

    Scanner in = new Scanner(System.in);

    rows = in.nextInt();
    cols = in.nextInt();

    a = new int[rows][cols];
    b = new int[cols][1];
    c = new int[rows][1];
    in.nextLine();

    for(int i=0; i<a.length; i++){
        for(int j=0; j<a[0].length; j++){
            a[i][j] = in.nextInt();
        }
        in.nextLine();
    }

    for(int i=0; i<b.length; i++){
        b[i][0] = in.nextInt();
        in.nextLine();
    }

    for(int i=0; i<a.length; i++){
        int tmp = 0;
        for(int j=0; j<a[0].length; j++)
            tmp += a[i][j]*b[j][0];
        c[i][0] = tmp;
    }

    for(int i=0; i<c.length; i++){
        System.out.println(c[i][0]);
    }
  }
} Main public static void main(String[] arg){
    int rows,cols;
    int [][] a,b,c;

    Scanner in = new Scanner(System.in);

    rows = in.nextInt();
    cols = in.nextInt();

    a = new int[rows][cols];
    b = new int[cols][1];
    c = new int[rows][1];
    in.nextLine();

    for(int i=0; i<a.length; i++){
        for(int j=0; j<a[0].length; j++){
            a[i][j] = in.nextInt();
        }
        in.nextLine();
    }

    for(int i=0; i<b.length; i++){
        b[i][0] = in.nextInt();
        in.nextLine();
    }

    for(int i=0; i<a.length; i++){
        int tmp = 0;
        for(int j=0; j<a[0].length; j++)
            tmp += a[i][j]*b[j][0];
        c[i][0] = tmp;
    }

    for(int i=0; i<c.length; i++){
        System.out.println(c[i][0]);
    }
  } main {
    int rows,cols;
    int [][] a,b,c;

    Scanner in = new Scanner(System.in);

    rows = in.nextInt();
    cols = in.nextInt();

    a = new int[rows][cols];
    b = new int[cols][1];
    c = new int[rows][1];
    in.nextLine();

    for(int i=0; i<a.length; i++){
        for(int j=0; j<a[0].length; j++){
            a[i][j] = in.nextInt();
        }
        in.nextLine();
    }

    for(int i=0; i<b.length; i++){
        b[i][0] = in.nextInt();
        in.nextLine();
    }

    for(int i=0; i<a.length; i++){
        int tmp = 0;
        for(int j=0; j<a[0].length; j++)
            tmp += a[i][j]*b[j][0];
        c[i][0] = tmp;
    }

    for(int i=0; i<c.length; i++){
        System.out.println(c[i][0]);
    }
  } int rows rows cols; cols int [][] a a b b c; c Scanner in = new Scanner(System.in); in new Scanner(System.in) rows = in.nextInt() rows in.nextInt() in.nextInt in cols = in.nextInt() cols in.nextInt() in.nextInt in a = new int[rows][cols] a new int[rows][cols] rows cols b = new int[cols][1] b new int[cols][1] cols 1 c = new int[rows][1] c new int[rows][1] rows 1 in.nextLine() in.nextLine in for(int i=0; i<a.length; i++){
        for(int j=0; j<a[0].length; j++){
            a[i][j] = in.nextInt();
        }
        in.nextLine();
    } int i=0; int i=0; i 0 i<a.length i a.length a a.length i++ i++ i {
        for(int j=0; j<a[0].length; j++){
            a[i][j] = in.nextInt();
        }
        in.nextLine();
    } {
        for(int j=0; j<a[0].length; j++){
            a[i][j] = in.nextInt();
        }
        in.nextLine();
    } for(int j=0; j<a[0].length; j++){
            a[i][j] = in.nextInt();
        } int j=0; int j=0; j 0 j<a[0].length j a[0].length a[0] a 0 a[0].length j++ j++ j {
            a[i][j] = in.nextInt();
        } {
            a[i][j] = in.nextInt();
        } a[i][j] = in.nextInt() a[i][j] a[i] a i j in.nextInt() in.nextInt in in.nextLine() in.nextLine in for(int i=0; i<b.length; i++){
        b[i][0] = in.nextInt();
        in.nextLine();
    } int i=0; int i=0; i 0 i<b.length i b.length b b.length i++ i++ i {
        b[i][0] = in.nextInt();
        in.nextLine();
    } {
        b[i][0] = in.nextInt();
        in.nextLine();
    } b[i][0] = in.nextInt() b[i][0] b[i] b i 0 in.nextInt() in.nextInt in in.nextLine() in.nextLine in for(int i=0; i<a.length; i++){
        int tmp = 0;
        for(int j=0; j<a[0].length; j++)
            tmp += a[i][j]*b[j][0];
        c[i][0] = tmp;
    } int i=0; int i=0; i 0 i<a.length i a.length a a.length i++ i++ i {
        int tmp = 0;
        for(int j=0; j<a[0].length; j++)
            tmp += a[i][j]*b[j][0];
        c[i][0] = tmp;
    } {
        int tmp = 0;
        for(int j=0; j<a[0].length; j++)
            tmp += a[i][j]*b[j][0];
        c[i][0] = tmp;
    } int tmp = 0; tmp 0 for(int j=0; j<a[0].length; j++)
            tmp += a[i][j]*b[j][0]; int j=0; int j=0; j 0 j<a[0].length j a[0].length a[0] a 0 a[0].length j++ j++ j tmp += a[i][j]*b[j][0]; tmp += a[i][j]*b[j][0] tmp a[i][j]*b[j][0] a[i][j] a[i] a i j b[j][0] b[j] b j 0 c[i][0] = tmp c[i][0] c[i] c i 0 tmp for(int i=0; i<c.length; i++){
        System.out.println(c[i][0]);
    } int i=0; int i=0; i 0 i<c.length i c.length c c.length i++ i++ i {
        System.out.println(c[i][0]);
    } {
        System.out.println(c[i][0]);
    } System.out.println(c[i][0]) System.out.println System.out System System.out c[i][0] c[i] c i 0 String[] arg arg
import java.util.Scanner;
 
class Main{
  public static void main(String[] arg){
    int rows,cols;
    int [][] a,b,c;

    Scanner in = new Scanner(System.in);

    rows = in.nextInt();
    cols = in.nextInt();

    a = new int[rows][cols];
    b = new int[cols][1];
    c = new int[rows][1];
    in.nextLine();

    for(int i=0; i<a.length; i++){
        for(int j=0; j<a[0].length; j++){
            a[i][j] = in.nextInt();
        }
        in.nextLine();
    }

    for(int i=0; i<b.length; i++){
        b[i][0] = in.nextInt();
        in.nextLine();
    }

    for(int i=0; i<a.length; i++){
        int tmp = 0;
        for(int j=0; j<a[0].length; j++)
            tmp += a[i][j]*b[j][0];
        c[i][0] = tmp;
    }

    for(int i=0; i<c.length; i++){
        System.out.println(c[i][0]);
    }
  }
}