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

public class Main {

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

		try {
			String str = br.readLine();
			String[] strArr = str.split(" ");

			// ??\?????¶??°???????????¨????????\???
			int n = Integer.parseInt(strArr[0]);
			int m = Integer.parseInt(strArr[1]);

			// ?¨??????¨??????
			String[][] a = new String[n][m];
			String[] b = new String[m];

			// n ?? m ?????? ?????\???
			for(int i=0;i<n;i++){
				str = br.readLine();
				a[i] = str.split(" ");

			}
			// n ?? 1 ?????? ?????\???
			for(int i=0;i<m;i++){
				b[i] = br.readLine();
			}

			// ?¨???? ??????
			int sum;
			for(int i=0;i<n;i++){
				sum=0;
				for(int j=0;j<m;j++){
					sum+=Integer.parseInt(a[i][j]) * Integer.parseInt(b[j]);
				}
				System.out.println(sum);
			}

		} catch (IOException e) {
			e.printStackTrace();
		}finally{
			try{
				if(br != null){
					br.close();
				}
			}catch(IOException ioe){
			}

		}
	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {

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

		try {
			String str = br.readLine();
			String[] strArr = str.split(" ");

			// ??\?????¶??°???????????¨????????\???
			int n = Integer.parseInt(strArr[0]);
			int m = Integer.parseInt(strArr[1]);

			// ?¨??????¨??????
			String[][] a = new String[n][m];
			String[] b = new String[m];

			// n ?? m ?????? ?????\???
			for(int i=0;i<n;i++){
				str = br.readLine();
				a[i] = str.split(" ");

			}
			// n ?? 1 ?????? ?????\???
			for(int i=0;i<m;i++){
				b[i] = br.readLine();
			}

			// ?¨???? ??????
			int sum;
			for(int i=0;i<n;i++){
				sum=0;
				for(int j=0;j<m;j++){
					sum+=Integer.parseInt(a[i][j]) * Integer.parseInt(b[j]);
				}
				System.out.println(sum);
			}

		} catch (IOException e) {
			e.printStackTrace();
		}finally{
			try{
				if(br != null){
					br.close();
				}
			}catch(IOException ioe){
			}

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

		try {
			String str = br.readLine();
			String[] strArr = str.split(" ");

			// ??\?????¶??°???????????¨????????\???
			int n = Integer.parseInt(strArr[0]);
			int m = Integer.parseInt(strArr[1]);

			// ?¨??????¨??????
			String[][] a = new String[n][m];
			String[] b = new String[m];

			// n ?? m ?????? ?????\???
			for(int i=0;i<n;i++){
				str = br.readLine();
				a[i] = str.split(" ");

			}
			// n ?? 1 ?????? ?????\???
			for(int i=0;i<m;i++){
				b[i] = br.readLine();
			}

			// ?¨???? ??????
			int sum;
			for(int i=0;i<n;i++){
				sum=0;
				for(int j=0;j<m;j++){
					sum+=Integer.parseInt(a[i][j]) * Integer.parseInt(b[j]);
				}
				System.out.println(sum);
			}

		} catch (IOException e) {
			e.printStackTrace();
		}finally{
			try{
				if(br != null){
					br.close();
				}
			}catch(IOException ioe){
			}

		}
	} main {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		try {
			String str = br.readLine();
			String[] strArr = str.split(" ");

			// ??\?????¶??°???????????¨????????\???
			int n = Integer.parseInt(strArr[0]);
			int m = Integer.parseInt(strArr[1]);

			// ?¨??????¨??????
			String[][] a = new String[n][m];
			String[] b = new String[m];

			// n ?? m ?????? ?????\???
			for(int i=0;i<n;i++){
				str = br.readLine();
				a[i] = str.split(" ");

			}
			// n ?? 1 ?????? ?????\???
			for(int i=0;i<m;i++){
				b[i] = br.readLine();
			}

			// ?¨???? ??????
			int sum;
			for(int i=0;i<n;i++){
				sum=0;
				for(int j=0;j<m;j++){
					sum+=Integer.parseInt(a[i][j]) * Integer.parseInt(b[j]);
				}
				System.out.println(sum);
			}

		} catch (IOException e) {
			e.printStackTrace();
		}finally{
			try{
				if(br != null){
					br.close();
				}
			}catch(IOException ioe){
			}

		}
	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) try {
			String str = br.readLine();
			String[] strArr = str.split(" ");

			// ??\?????¶??°???????????¨????????\???
			int n = Integer.parseInt(strArr[0]);
			int m = Integer.parseInt(strArr[1]);

			// ?¨??????¨??????
			String[][] a = new String[n][m];
			String[] b = new String[m];

			// n ?? m ?????? ?????\???
			for(int i=0;i<n;i++){
				str = br.readLine();
				a[i] = str.split(" ");

			}
			// n ?? 1 ?????? ?????\???
			for(int i=0;i<m;i++){
				b[i] = br.readLine();
			}

			// ?¨???? ??????
			int sum;
			for(int i=0;i<n;i++){
				sum=0;
				for(int j=0;j<m;j++){
					sum+=Integer.parseInt(a[i][j]) * Integer.parseInt(b[j]);
				}
				System.out.println(sum);
			}

		} catch (IOException e) {
			e.printStackTrace();
		}finally{
			try{
				if(br != null){
					br.close();
				}
			}catch(IOException ioe){
			}

		} catch (IOException e) {
			e.printStackTrace();
		} IOException e {
			e.printStackTrace();
		} e.printStackTrace() e.printStackTrace e {
			try{
				if(br != null){
					br.close();
				}
			}catch(IOException ioe){
			}

		} try{
				if(br != null){
					br.close();
				}
			}catch(IOException ioe){
			} catch(IOException ioe){
			} IOException ioe {
			} {
				if(br != null){
					br.close();
				}
			} if(br != null){
					br.close();
				} br != null br null {
					br.close();
				} br.close() br.close br {
			String str = br.readLine();
			String[] strArr = str.split(" ");

			// ??\?????¶??°???????????¨????????\???
			int n = Integer.parseInt(strArr[0]);
			int m = Integer.parseInt(strArr[1]);

			// ?¨??????¨??????
			String[][] a = new String[n][m];
			String[] b = new String[m];

			// n ?? m ?????? ?????\???
			for(int i=0;i<n;i++){
				str = br.readLine();
				a[i] = str.split(" ");

			}
			// n ?? 1 ?????? ?????\???
			for(int i=0;i<m;i++){
				b[i] = br.readLine();
			}

			// ?¨???? ??????
			int sum;
			for(int i=0;i<n;i++){
				sum=0;
				for(int j=0;j<m;j++){
					sum+=Integer.parseInt(a[i][j]) * Integer.parseInt(b[j]);
				}
				System.out.println(sum);
			}

		} String str = br.readLine(); str br.readLine() br.readLine br String[] strArr = str.split(" "); strArr str.split(" ") str.split str " " int n = Integer.parseInt(strArr[0]); n Integer.parseInt(strArr[0]) Integer.parseInt Integer strArr[0] strArr 0 int m = Integer.parseInt(strArr[1]); m Integer.parseInt(strArr[1]) Integer.parseInt Integer strArr[1] strArr 1 String[][] a = new String[n][m]; a new String[n][m] n m String[] b = new String[m]; b new String[m] m for(int i=0;i<n;i++){
				str = br.readLine();
				a[i] = str.split(" ");

			} int i=0; int i=0; i 0 i<n i n i++ i++ i {
				str = br.readLine();
				a[i] = str.split(" ");

			} {
				str = br.readLine();
				a[i] = str.split(" ");

			} str = br.readLine() str br.readLine() br.readLine br a[i] = str.split(" ") a[i] a i str.split(" ") str.split str " " for(int i=0;i<m;i++){
				b[i] = br.readLine();
			} int i=0; int i=0; i 0 i<m i m i++ i++ i {
				b[i] = br.readLine();
			} {
				b[i] = br.readLine();
			} b[i] = br.readLine() b[i] b i br.readLine() br.readLine br int sum; sum for(int i=0;i<n;i++){
				sum=0;
				for(int j=0;j<m;j++){
					sum+=Integer.parseInt(a[i][j]) * Integer.parseInt(b[j]);
				}
				System.out.println(sum);
			} int i=0; int i=0; i 0 i<n i n i++ i++ i {
				sum=0;
				for(int j=0;j<m;j++){
					sum+=Integer.parseInt(a[i][j]) * Integer.parseInt(b[j]);
				}
				System.out.println(sum);
			} {
				sum=0;
				for(int j=0;j<m;j++){
					sum+=Integer.parseInt(a[i][j]) * Integer.parseInt(b[j]);
				}
				System.out.println(sum);
			} sum=0 sum 0 for(int j=0;j<m;j++){
					sum+=Integer.parseInt(a[i][j]) * Integer.parseInt(b[j]);
				} int j=0; int j=0; j 0 j<m j m j++ j++ j {
					sum+=Integer.parseInt(a[i][j]) * Integer.parseInt(b[j]);
				} {
					sum+=Integer.parseInt(a[i][j]) * Integer.parseInt(b[j]);
				} sum+=Integer.parseInt(a[i][j]) * Integer.parseInt(b[j]) sum Integer.parseInt(a[i][j]) * Integer.parseInt(b[j]) Integer.parseInt(a[i][j]) Integer.parseInt Integer a[i][j] a[i] a i j Integer.parseInt(b[j]) Integer.parseInt Integer b[j] b 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) {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		try {
			String str = br.readLine();
			String[] strArr = str.split(" ");

			// ??\?????¶??°???????????¨????????\???
			int n = Integer.parseInt(strArr[0]);
			int m = Integer.parseInt(strArr[1]);

			// ?¨??????¨??????
			String[][] a = new String[n][m];
			String[] b = new String[m];

			// n ?? m ?????? ?????\???
			for(int i=0;i<n;i++){
				str = br.readLine();
				a[i] = str.split(" ");

			}
			// n ?? 1 ?????? ?????\???
			for(int i=0;i<m;i++){
				b[i] = br.readLine();
			}

			// ?¨???? ??????
			int sum;
			for(int i=0;i<n;i++){
				sum=0;
				for(int j=0;j<m;j++){
					sum+=Integer.parseInt(a[i][j]) * Integer.parseInt(b[j]);
				}
				System.out.println(sum);
			}

		} catch (IOException e) {
			e.printStackTrace();
		}finally{
			try{
				if(br != null){
					br.close();
				}
			}catch(IOException ioe){
			}

		}
	}
} public class Main {

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

		try {
			String str = br.readLine();
			String[] strArr = str.split(" ");

			// ??\?????¶??°???????????¨????????\???
			int n = Integer.parseInt(strArr[0]);
			int m = Integer.parseInt(strArr[1]);

			// ?¨??????¨??????
			String[][] a = new String[n][m];
			String[] b = new String[m];

			// n ?? m ?????? ?????\???
			for(int i=0;i<n;i++){
				str = br.readLine();
				a[i] = str.split(" ");

			}
			// n ?? 1 ?????? ?????\???
			for(int i=0;i<m;i++){
				b[i] = br.readLine();
			}

			// ?¨???? ??????
			int sum;
			for(int i=0;i<n;i++){
				sum=0;
				for(int j=0;j<m;j++){
					sum+=Integer.parseInt(a[i][j]) * Integer.parseInt(b[j]);
				}
				System.out.println(sum);
			}

		} catch (IOException e) {
			e.printStackTrace();
		}finally{
			try{
				if(br != null){
					br.close();
				}
			}catch(IOException ioe){
			}

		}
	}
} Main

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

public class Main {

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

		try {
			String str = br.readLine();
			String[] strArr = str.split(" ");

			// ??\?????¶??°???????????¨????????\???
			int n = Integer.parseInt(strArr[0]);
			int m = Integer.parseInt(strArr[1]);

			// ?¨??????¨??????
			String[][] a = new String[n][m];
			String[] b = new String[m];

			// n ?? m ?????? ?????\???
			for(int i=0;i<n;i++){
				str = br.readLine();
				a[i] = str.split(" ");

			}
			// n ?? 1 ?????? ?????\???
			for(int i=0;i<m;i++){
				b[i] = br.readLine();
			}

			// ?¨???? ??????
			int sum;
			for(int i=0;i<n;i++){
				sum=0;
				for(int j=0;j<m;j++){
					sum+=Integer.parseInt(a[i][j]) * Integer.parseInt(b[j]);
				}
				System.out.println(sum);
			}

		} catch (IOException e) {
			e.printStackTrace();
		}finally{
			try{
				if(br != null){
					br.close();
				}
			}catch(IOException ioe){
			}

		}
	}
}