import java.io.IOException;
import java.util.Scanner;

public class Main {
    public static void main (String args[]) throws IOException {
    	Scanner sc = new Scanner(System.in);
    	int N = sc.nextInt();
    	int M = sc.nextInt();
    	int y;

    	int[][] a = new int[N][M];
    	int[] c = new int[M] ;
    	//Arrays.fill(c, "");

    	for(int i=0;i<N;i++){
    	   for(int p=0;p<M;p++){
    		   int z = sc.nextInt();
    	      a[i][p] = z;
    	   }
    	}

        for(int p=0;p<M;p++){
        	int z = sc.nextInt();
    	      c[p] = z;
    	 }

        for(int i=0;i<N;i++){
           y =0;
    	   for(int p=0;p<M;p++){
    	     y += a[i][p] * c[p];

    	   }
    	   System.out.println(y);
    	}
    }
} import java.io.IOException; IOException java.io import java.util.Scanner; Scanner java.util public class Main {
    public static void main (String args[]) throws IOException {
    	Scanner sc = new Scanner(System.in);
    	int N = sc.nextInt();
    	int M = sc.nextInt();
    	int y;

    	int[][] a = new int[N][M];
    	int[] c = new int[M] ;
    	//Arrays.fill(c, "");

    	for(int i=0;i<N;i++){
    	   for(int p=0;p<M;p++){
    		   int z = sc.nextInt();
    	      a[i][p] = z;
    	   }
    	}

        for(int p=0;p<M;p++){
        	int z = sc.nextInt();
    	      c[p] = z;
    	 }

        for(int i=0;i<N;i++){
           y =0;
    	   for(int p=0;p<M;p++){
    	     y += a[i][p] * c[p];

    	   }
    	   System.out.println(y);
    	}
    }
} Main public static void main (String args[]) throws IOException {
    	Scanner sc = new Scanner(System.in);
    	int N = sc.nextInt();
    	int M = sc.nextInt();
    	int y;

    	int[][] a = new int[N][M];
    	int[] c = new int[M] ;
    	//Arrays.fill(c, "");

    	for(int i=0;i<N;i++){
    	   for(int p=0;p<M;p++){
    		   int z = sc.nextInt();
    	      a[i][p] = z;
    	   }
    	}

        for(int p=0;p<M;p++){
        	int z = sc.nextInt();
    	      c[p] = z;
    	 }

        for(int i=0;i<N;i++){
           y =0;
    	   for(int p=0;p<M;p++){
    	     y += a[i][p] * c[p];

    	   }
    	   System.out.println(y);
    	}
    } main {
    	Scanner sc = new Scanner(System.in);
    	int N = sc.nextInt();
    	int M = sc.nextInt();
    	int y;

    	int[][] a = new int[N][M];
    	int[] c = new int[M] ;
    	//Arrays.fill(c, "");

    	for(int i=0;i<N;i++){
    	   for(int p=0;p<M;p++){
    		   int z = sc.nextInt();
    	      a[i][p] = z;
    	   }
    	}

        for(int p=0;p<M;p++){
        	int z = sc.nextInt();
    	      c[p] = z;
    	 }

        for(int i=0;i<N;i++){
           y =0;
    	   for(int p=0;p<M;p++){
    	     y += a[i][p] * c[p];

    	   }
    	   System.out.println(y);
    	}
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc int M = sc.nextInt(); M sc.nextInt() sc.nextInt sc int y; y int[][] a = new int[N][M]; a new int[N][M] N M int[] c = new int[M] ; c new int[M] M for(int i=0;i<N;i++){
    	   for(int p=0;p<M;p++){
    		   int z = sc.nextInt();
    	      a[i][p] = z;
    	   }
    	} int i=0; int i=0; i 0 i<N i N i++ i++ i {
    	   for(int p=0;p<M;p++){
    		   int z = sc.nextInt();
    	      a[i][p] = z;
    	   }
    	} {
    	   for(int p=0;p<M;p++){
    		   int z = sc.nextInt();
    	      a[i][p] = z;
    	   }
    	} for(int p=0;p<M;p++){
    		   int z = sc.nextInt();
    	      a[i][p] = z;
    	   } int p=0; int p=0; p 0 p<M p M p++ p++ p {
    		   int z = sc.nextInt();
    	      a[i][p] = z;
    	   } {
    		   int z = sc.nextInt();
    	      a[i][p] = z;
    	   } int z = sc.nextInt(); z sc.nextInt() sc.nextInt sc a[i][p] = z a[i][p] a[i] a i p z for(int p=0;p<M;p++){
        	int z = sc.nextInt();
    	      c[p] = z;
    	 } int p=0; int p=0; p 0 p<M p M p++ p++ p {
        	int z = sc.nextInt();
    	      c[p] = z;
    	 } {
        	int z = sc.nextInt();
    	      c[p] = z;
    	 } int z = sc.nextInt(); z sc.nextInt() sc.nextInt sc c[p] = z c[p] c p z for(int i=0;i<N;i++){
           y =0;
    	   for(int p=0;p<M;p++){
    	     y += a[i][p] * c[p];

    	   }
    	   System.out.println(y);
    	} int i=0; int i=0; i 0 i<N i N i++ i++ i {
           y =0;
    	   for(int p=0;p<M;p++){
    	     y += a[i][p] * c[p];

    	   }
    	   System.out.println(y);
    	} {
           y =0;
    	   for(int p=0;p<M;p++){
    	     y += a[i][p] * c[p];

    	   }
    	   System.out.println(y);
    	} y =0 y 0 for(int p=0;p<M;p++){
    	     y += a[i][p] * c[p];

    	   } int p=0; int p=0; p 0 p<M p M p++ p++ p {
    	     y += a[i][p] * c[p];

    	   } {
    	     y += a[i][p] * c[p];

    	   } y += a[i][p] * c[p] y a[i][p] * c[p] a[i][p] a[i] a i p c[p] c p System.out.println(y) System.out.println System.out System System.out y String args[] args public class Main {
    public static void main (String args[]) throws IOException {
    	Scanner sc = new Scanner(System.in);
    	int N = sc.nextInt();
    	int M = sc.nextInt();
    	int y;

    	int[][] a = new int[N][M];
    	int[] c = new int[M] ;
    	//Arrays.fill(c, "");

    	for(int i=0;i<N;i++){
    	   for(int p=0;p<M;p++){
    		   int z = sc.nextInt();
    	      a[i][p] = z;
    	   }
    	}

        for(int p=0;p<M;p++){
        	int z = sc.nextInt();
    	      c[p] = z;
    	 }

        for(int i=0;i<N;i++){
           y =0;
    	   for(int p=0;p<M;p++){
    	     y += a[i][p] * c[p];

    	   }
    	   System.out.println(y);
    	}
    }
} public class Main {
    public static void main (String args[]) throws IOException {
    	Scanner sc = new Scanner(System.in);
    	int N = sc.nextInt();
    	int M = sc.nextInt();
    	int y;

    	int[][] a = new int[N][M];
    	int[] c = new int[M] ;
    	//Arrays.fill(c, "");

    	for(int i=0;i<N;i++){
    	   for(int p=0;p<M;p++){
    		   int z = sc.nextInt();
    	      a[i][p] = z;
    	   }
    	}

        for(int p=0;p<M;p++){
        	int z = sc.nextInt();
    	      c[p] = z;
    	 }

        for(int i=0;i<N;i++){
           y =0;
    	   for(int p=0;p<M;p++){
    	     y += a[i][p] * c[p];

    	   }
    	   System.out.println(y);
    	}
    }
} Main
import java.io.IOException;
import java.util.Scanner;

public class Main {
    public static void main (String args[]) throws IOException {
    	Scanner sc = new Scanner(System.in);
    	int N = sc.nextInt();
    	int M = sc.nextInt();
    	int y;

    	int[][] a = new int[N][M];
    	int[] c = new int[M] ;
    	//Arrays.fill(c, "");

    	for(int i=0;i<N;i++){
    	   for(int p=0;p<M;p++){
    		   int z = sc.nextInt();
    	      a[i][p] = z;
    	   }
    	}

        for(int p=0;p<M;p++){
        	int z = sc.nextInt();
    	      c[p] = z;
    	 }

        for(int i=0;i<N;i++){
           y =0;
    	   for(int p=0;p<M;p++){
    	     y += a[i][p] * c[p];

    	   }
    	   System.out.println(y);
    	}
    }
}