import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {
	public static void main(String[] args) throws Exception {
	    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

	    String[] line = br.readLine().split(" ");
	    int n = Integer.parseInt(line[0]);
	    int m = Integer.parseInt(line[1]);

	    // parse A
	    int[][] a = new int[n][m];
	    for (int i = 0; i < n; i++) {
	    	line = br.readLine().split(" ");
	    	for (int j = 0; j < m; j++) {
		    	a[i][j] = Integer.parseInt(line[j]);
	    	}
	    }

	    // parse B
	    int[][] b = new int[m][1];
	    for (int i = 0; i < m; i++) {
	    	b[i][0] = Integer.parseInt(br.readLine());
	    }

	    // Calculation
	    int[][] ans = new int[n][1];
	    for (int i = 0; i < n; i++) {
	    	for (int j = 0; j < m; j++) {
	    		ans[i][0] += (a[i][j] * b[j][0]);
	    	}
	    }

	    // Display Answer
	    for (int i = 0; i < ans.length; i++) {
	    	System.out.println(ans[i][0]);
	    }
	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {
	public static void main(String[] args) throws Exception {
	    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

	    String[] line = br.readLine().split(" ");
	    int n = Integer.parseInt(line[0]);
	    int m = Integer.parseInt(line[1]);

	    // parse A
	    int[][] a = new int[n][m];
	    for (int i = 0; i < n; i++) {
	    	line = br.readLine().split(" ");
	    	for (int j = 0; j < m; j++) {
		    	a[i][j] = Integer.parseInt(line[j]);
	    	}
	    }

	    // parse B
	    int[][] b = new int[m][1];
	    for (int i = 0; i < m; i++) {
	    	b[i][0] = Integer.parseInt(br.readLine());
	    }

	    // Calculation
	    int[][] ans = new int[n][1];
	    for (int i = 0; i < n; i++) {
	    	for (int j = 0; j < m; j++) {
	    		ans[i][0] += (a[i][j] * b[j][0]);
	    	}
	    }

	    // Display Answer
	    for (int i = 0; i < ans.length; i++) {
	    	System.out.println(ans[i][0]);
	    }
	}
} Main public static void main(String[] args) throws Exception {
	    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

	    String[] line = br.readLine().split(" ");
	    int n = Integer.parseInt(line[0]);
	    int m = Integer.parseInt(line[1]);

	    // parse A
	    int[][] a = new int[n][m];
	    for (int i = 0; i < n; i++) {
	    	line = br.readLine().split(" ");
	    	for (int j = 0; j < m; j++) {
		    	a[i][j] = Integer.parseInt(line[j]);
	    	}
	    }

	    // parse B
	    int[][] b = new int[m][1];
	    for (int i = 0; i < m; i++) {
	    	b[i][0] = Integer.parseInt(br.readLine());
	    }

	    // Calculation
	    int[][] ans = new int[n][1];
	    for (int i = 0; i < n; i++) {
	    	for (int j = 0; j < m; j++) {
	    		ans[i][0] += (a[i][j] * b[j][0]);
	    	}
	    }

	    // Display Answer
	    for (int i = 0; i < ans.length; i++) {
	    	System.out.println(ans[i][0]);
	    }
	} main {
	    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

	    String[] line = br.readLine().split(" ");
	    int n = Integer.parseInt(line[0]);
	    int m = Integer.parseInt(line[1]);

	    // parse A
	    int[][] a = new int[n][m];
	    for (int i = 0; i < n; i++) {
	    	line = br.readLine().split(" ");
	    	for (int j = 0; j < m; j++) {
		    	a[i][j] = Integer.parseInt(line[j]);
	    	}
	    }

	    // parse B
	    int[][] b = new int[m][1];
	    for (int i = 0; i < m; i++) {
	    	b[i][0] = Integer.parseInt(br.readLine());
	    }

	    // Calculation
	    int[][] ans = new int[n][1];
	    for (int i = 0; i < n; i++) {
	    	for (int j = 0; j < m; j++) {
	    		ans[i][0] += (a[i][j] * b[j][0]);
	    	}
	    }

	    // Display Answer
	    for (int i = 0; i < ans.length; i++) {
	    	System.out.println(ans[i][0]);
	    }
	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String[] line = br.readLine().split(" "); line br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " int n = Integer.parseInt(line[0]); n Integer.parseInt(line[0]) Integer.parseInt Integer line[0] line 0 int m = Integer.parseInt(line[1]); m Integer.parseInt(line[1]) Integer.parseInt Integer line[1] line 1 int[][] a = new int[n][m]; a new int[n][m] n m for (int i = 0; i < n; i++) {
	    	line = br.readLine().split(" ");
	    	for (int j = 0; j < m; j++) {
		    	a[i][j] = Integer.parseInt(line[j]);
	    	}
	    } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
	    	line = br.readLine().split(" ");
	    	for (int j = 0; j < m; j++) {
		    	a[i][j] = Integer.parseInt(line[j]);
	    	}
	    } {
	    	line = br.readLine().split(" ");
	    	for (int j = 0; j < m; j++) {
		    	a[i][j] = Integer.parseInt(line[j]);
	    	}
	    } line = br.readLine().split(" ") line br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " for (int j = 0; j < m; j++) {
		    	a[i][j] = Integer.parseInt(line[j]);
	    	} int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
		    	a[i][j] = Integer.parseInt(line[j]);
	    	} {
		    	a[i][j] = Integer.parseInt(line[j]);
	    	} a[i][j] = Integer.parseInt(line[j]) a[i][j] a[i] a i j Integer.parseInt(line[j]) Integer.parseInt Integer line[j] line j int[][] b = new int[m][1]; b new int[m][1] m 1 for (int i = 0; i < m; i++) {
	    	b[i][0] = Integer.parseInt(br.readLine());
	    } int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
	    	b[i][0] = Integer.parseInt(br.readLine());
	    } {
	    	b[i][0] = Integer.parseInt(br.readLine());
	    } b[i][0] = Integer.parseInt(br.readLine()) b[i][0] b[i] b i 0 Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br int[][] ans = new int[n][1]; ans new int[n][1] n 1 for (int i = 0; i < n; i++) {
	    	for (int j = 0; j < m; j++) {
	    		ans[i][0] += (a[i][j] * b[j][0]);
	    	}
	    } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
	    	for (int j = 0; j < m; j++) {
	    		ans[i][0] += (a[i][j] * b[j][0]);
	    	}
	    } {
	    	for (int j = 0; j < m; j++) {
	    		ans[i][0] += (a[i][j] * b[j][0]);
	    	}
	    } for (int j = 0; j < m; j++) {
	    		ans[i][0] += (a[i][j] * b[j][0]);
	    	} int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
	    		ans[i][0] += (a[i][j] * b[j][0]);
	    	} {
	    		ans[i][0] += (a[i][j] * b[j][0]);
	    	} ans[i][0] += (a[i][j] * b[j][0]) ans[i][0] ans[i] ans i 0 (a[i][j] * b[j][0]) a[i][j] a[i] a i j b[j][0] b[j] b j 0 for (int i = 0; i < ans.length; i++) {
	    	System.out.println(ans[i][0]);
	    } int i = 0; int i = 0; i 0 i < ans.length i ans.length ans ans.length i++ i++ i {
	    	System.out.println(ans[i][0]);
	    } {
	    	System.out.println(ans[i][0]);
	    } System.out.println(ans[i][0]) System.out.println System.out System System.out ans[i][0] ans[i] ans i 0 String[] args args public class Main {
	public static void main(String[] args) throws Exception {
	    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

	    String[] line = br.readLine().split(" ");
	    int n = Integer.parseInt(line[0]);
	    int m = Integer.parseInt(line[1]);

	    // parse A
	    int[][] a = new int[n][m];
	    for (int i = 0; i < n; i++) {
	    	line = br.readLine().split(" ");
	    	for (int j = 0; j < m; j++) {
		    	a[i][j] = Integer.parseInt(line[j]);
	    	}
	    }

	    // parse B
	    int[][] b = new int[m][1];
	    for (int i = 0; i < m; i++) {
	    	b[i][0] = Integer.parseInt(br.readLine());
	    }

	    // Calculation
	    int[][] ans = new int[n][1];
	    for (int i = 0; i < n; i++) {
	    	for (int j = 0; j < m; j++) {
	    		ans[i][0] += (a[i][j] * b[j][0]);
	    	}
	    }

	    // Display Answer
	    for (int i = 0; i < ans.length; i++) {
	    	System.out.println(ans[i][0]);
	    }
	}
} public class Main {
	public static void main(String[] args) throws Exception {
	    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

	    String[] line = br.readLine().split(" ");
	    int n = Integer.parseInt(line[0]);
	    int m = Integer.parseInt(line[1]);

	    // parse A
	    int[][] a = new int[n][m];
	    for (int i = 0; i < n; i++) {
	    	line = br.readLine().split(" ");
	    	for (int j = 0; j < m; j++) {
		    	a[i][j] = Integer.parseInt(line[j]);
	    	}
	    }

	    // parse B
	    int[][] b = new int[m][1];
	    for (int i = 0; i < m; i++) {
	    	b[i][0] = Integer.parseInt(br.readLine());
	    }

	    // Calculation
	    int[][] ans = new int[n][1];
	    for (int i = 0; i < n; i++) {
	    	for (int j = 0; j < m; j++) {
	    		ans[i][0] += (a[i][j] * b[j][0]);
	    	}
	    }

	    // Display Answer
	    for (int i = 0; i < ans.length; i++) {
	    	System.out.println(ans[i][0]);
	    }
	}
} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {
	public static void main(String[] args) throws Exception {
	    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

	    String[] line = br.readLine().split(" ");
	    int n = Integer.parseInt(line[0]);
	    int m = Integer.parseInt(line[1]);

	    // parse A
	    int[][] a = new int[n][m];
	    for (int i = 0; i < n; i++) {
	    	line = br.readLine().split(" ");
	    	for (int j = 0; j < m; j++) {
		    	a[i][j] = Integer.parseInt(line[j]);
	    	}
	    }

	    // parse B
	    int[][] b = new int[m][1];
	    for (int i = 0; i < m; i++) {
	    	b[i][0] = Integer.parseInt(br.readLine());
	    }

	    // Calculation
	    int[][] ans = new int[n][1];
	    for (int i = 0; i < n; i++) {
	    	for (int j = 0; j < m; j++) {
	    		ans[i][0] += (a[i][j] * b[j][0]);
	    	}
	    }

	    // Display Answer
	    for (int i = 0; i < ans.length; i++) {
	    	System.out.println(ans[i][0]);
	    }
	}
}