import java.util.Scanner;

class Main {
  public static void main(String args[]) {
	  	Scanner scanner = new Scanner(System.in);
	  	int  a = scanner.nextInt();
	  	int  b = scanner.nextInt();
	  	int[][] array;//配列確保
        array = new int[a][b];
        int Vec[] = new int[b];  // 配列確保
        int sum[] = new int[a];
        int x = 0;
        
        
        // データ入力
        for (int i = 0; i < a; i++) {
        	for (int j = 0; j < b; j++) {
	            array[i][j]=scanner.nextInt();
	        }
        }
        for (int i = 0; i < b; i++) {
	            Vec[i]=scanner.nextInt();
	     }
        
        for (int i = 0; i < a; i++) {
        	for (int j = 0; j < b; j++) {
	            sum[i] = array[i][j] * Vec[j] + x;
	            x = sum[i];
	        }
	        x = 0;
        }
        for (int i = 0; i < a; i++) {
	            System.out.println(sum[i]);
	     }
        
        
        
        scanner.close();
  }
} import java.util.Scanner; Scanner java.util class Main {
  public static void main(String args[]) {
	  	Scanner scanner = new Scanner(System.in);
	  	int  a = scanner.nextInt();
	  	int  b = scanner.nextInt();
	  	int[][] array;//配列確保
        array = new int[a][b];
        int Vec[] = new int[b];  // 配列確保
        int sum[] = new int[a];
        int x = 0;
        
        
        // データ入力
        for (int i = 0; i < a; i++) {
        	for (int j = 0; j < b; j++) {
	            array[i][j]=scanner.nextInt();
	        }
        }
        for (int i = 0; i < b; i++) {
	            Vec[i]=scanner.nextInt();
	     }
        
        for (int i = 0; i < a; i++) {
        	for (int j = 0; j < b; j++) {
	            sum[i] = array[i][j] * Vec[j] + x;
	            x = sum[i];
	        }
	        x = 0;
        }
        for (int i = 0; i < a; i++) {
	            System.out.println(sum[i]);
	     }
        
        
        
        scanner.close();
  }
} Main public static void main(String args[]) {
	  	Scanner scanner = new Scanner(System.in);
	  	int  a = scanner.nextInt();
	  	int  b = scanner.nextInt();
	  	int[][] array;//配列確保
        array = new int[a][b];
        int Vec[] = new int[b];  // 配列確保
        int sum[] = new int[a];
        int x = 0;
        
        
        // データ入力
        for (int i = 0; i < a; i++) {
        	for (int j = 0; j < b; j++) {
	            array[i][j]=scanner.nextInt();
	        }
        }
        for (int i = 0; i < b; i++) {
	            Vec[i]=scanner.nextInt();
	     }
        
        for (int i = 0; i < a; i++) {
        	for (int j = 0; j < b; j++) {
	            sum[i] = array[i][j] * Vec[j] + x;
	            x = sum[i];
	        }
	        x = 0;
        }
        for (int i = 0; i < a; i++) {
	            System.out.println(sum[i]);
	     }
        
        
        
        scanner.close();
  } main {
	  	Scanner scanner = new Scanner(System.in);
	  	int  a = scanner.nextInt();
	  	int  b = scanner.nextInt();
	  	int[][] array;//配列確保
        array = new int[a][b];
        int Vec[] = new int[b];  // 配列確保
        int sum[] = new int[a];
        int x = 0;
        
        
        // データ入力
        for (int i = 0; i < a; i++) {
        	for (int j = 0; j < b; j++) {
	            array[i][j]=scanner.nextInt();
	        }
        }
        for (int i = 0; i < b; i++) {
	            Vec[i]=scanner.nextInt();
	     }
        
        for (int i = 0; i < a; i++) {
        	for (int j = 0; j < b; j++) {
	            sum[i] = array[i][j] * Vec[j] + x;
	            x = sum[i];
	        }
	        x = 0;
        }
        for (int i = 0; i < a; i++) {
	            System.out.println(sum[i]);
	     }
        
        
        
        scanner.close();
  } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int  a = scanner.nextInt(); a scanner.nextInt() scanner.nextInt scanner int  b = scanner.nextInt(); b scanner.nextInt() scanner.nextInt scanner int[][] array; array array = new int[a][b] array new int[a][b] a b int Vec[] = new int[b]; Vec new int[b] b int sum[] = new int[a]; sum new int[a] a int x = 0; x 0 for (int i = 0; i < a; i++) {
        	for (int j = 0; j < b; j++) {
	            array[i][j]=scanner.nextInt();
	        }
        } int i = 0; int i = 0; i 0 i < a i a i++ i++ i {
        	for (int j = 0; j < b; j++) {
	            array[i][j]=scanner.nextInt();
	        }
        } {
        	for (int j = 0; j < b; j++) {
	            array[i][j]=scanner.nextInt();
	        }
        } for (int j = 0; j < b; j++) {
	            array[i][j]=scanner.nextInt();
	        } int j = 0; int j = 0; j 0 j < b j b j++ j++ j {
	            array[i][j]=scanner.nextInt();
	        } {
	            array[i][j]=scanner.nextInt();
	        } array[i][j]=scanner.nextInt() array[i][j] array[i] array i j scanner.nextInt() scanner.nextInt scanner for (int i = 0; i < b; i++) {
	            Vec[i]=scanner.nextInt();
	     } int i = 0; int i = 0; i 0 i < b i b i++ i++ i {
	            Vec[i]=scanner.nextInt();
	     } {
	            Vec[i]=scanner.nextInt();
	     } Vec[i]=scanner.nextInt() Vec[i] Vec i scanner.nextInt() scanner.nextInt scanner for (int i = 0; i < a; i++) {
        	for (int j = 0; j < b; j++) {
	            sum[i] = array[i][j] * Vec[j] + x;
	            x = sum[i];
	        }
	        x = 0;
        } int i = 0; int i = 0; i 0 i < a i a i++ i++ i {
        	for (int j = 0; j < b; j++) {
	            sum[i] = array[i][j] * Vec[j] + x;
	            x = sum[i];
	        }
	        x = 0;
        } {
        	for (int j = 0; j < b; j++) {
	            sum[i] = array[i][j] * Vec[j] + x;
	            x = sum[i];
	        }
	        x = 0;
        } for (int j = 0; j < b; j++) {
	            sum[i] = array[i][j] * Vec[j] + x;
	            x = sum[i];
	        } int j = 0; int j = 0; j 0 j < b j b j++ j++ j {
	            sum[i] = array[i][j] * Vec[j] + x;
	            x = sum[i];
	        } {
	            sum[i] = array[i][j] * Vec[j] + x;
	            x = sum[i];
	        } sum[i] = array[i][j] * Vec[j] + x sum[i] sum i array[i][j] * Vec[j] + x array[i][j] * Vec[j] array[i][j] array[i] array i j Vec[j] Vec j x x = sum[i] x sum[i] sum i x = 0 x 0 for (int i = 0; i < a; i++) {
	            System.out.println(sum[i]);
	     } int i = 0; int i = 0; i 0 i < a i a i++ i++ i {
	            System.out.println(sum[i]);
	     } {
	            System.out.println(sum[i]);
	     } System.out.println(sum[i]) System.out.println System.out System System.out sum[i] sum i scanner.close() scanner.close scanner String args[] args
import java.util.Scanner;

class Main {
  public static void main(String args[]) {
	  	Scanner scanner = new Scanner(System.in);
	  	int  a = scanner.nextInt();
	  	int  b = scanner.nextInt();
	  	int[][] array;//配列確保
        array = new int[a][b];
        int Vec[] = new int[b];  // 配列確保
        int sum[] = new int[a];
        int x = 0;
        
        
        // データ入力
        for (int i = 0; i < a; i++) {
        	for (int j = 0; j < b; j++) {
	            array[i][j]=scanner.nextInt();
	        }
        }
        for (int i = 0; i < b; i++) {
	            Vec[i]=scanner.nextInt();
	     }
        
        for (int i = 0; i < a; i++) {
        	for (int j = 0; j < b; j++) {
	            sum[i] = array[i][j] * Vec[j] + x;
	            x = sum[i];
	        }
	        x = 0;
        }
        for (int i = 0; i < a; i++) {
	            System.out.println(sum[i]);
	     }
        
        
        
        scanner.close();
  }
}
