import java.io.*;

class Main {
	public static void main(String[] args) {
		BufferedReader kb = new BufferedReader( new InputStreamReader( System.in ) );
		try {
			String str = kb.readLine();
			String[] tmpArr = str.split( " " );
			int n = Integer.parseInt( tmpArr[0] );
			int m = Integer.parseInt( tmpArr[1] );
						
			int[][] a = new int[n][m];
			int[] b = new int[m];
			int c;


			for( int i=0; i<n; i++ ) {
				str = kb.readLine();
				tmpArr = str.split( " " );
				for( int j=0; j<m; j++ ) {
					a[i][j]=Integer.parseInt( tmpArr[j] );
				}
			}
			for( int j=0; j<m; j++ ) {
				str = kb.readLine();
				b[j]=Integer.parseInt( str );
			}
			
			for( int i=0; i<n; i++ ) {
				c=0;
				for( int j=0; j<m; j++ ) {
					c+=a[i][j]*b[j];
				}
				System.out.print( c+"\n" ); 
			}
		} catch( IOException e ) {
			System.err.println( e );
		}
	}
} import java.io.*; io.* java class Main {
	public static void main(String[] args) {
		BufferedReader kb = new BufferedReader( new InputStreamReader( System.in ) );
		try {
			String str = kb.readLine();
			String[] tmpArr = str.split( " " );
			int n = Integer.parseInt( tmpArr[0] );
			int m = Integer.parseInt( tmpArr[1] );
						
			int[][] a = new int[n][m];
			int[] b = new int[m];
			int c;


			for( int i=0; i<n; i++ ) {
				str = kb.readLine();
				tmpArr = str.split( " " );
				for( int j=0; j<m; j++ ) {
					a[i][j]=Integer.parseInt( tmpArr[j] );
				}
			}
			for( int j=0; j<m; j++ ) {
				str = kb.readLine();
				b[j]=Integer.parseInt( str );
			}
			
			for( int i=0; i<n; i++ ) {
				c=0;
				for( int j=0; j<m; j++ ) {
					c+=a[i][j]*b[j];
				}
				System.out.print( c+"\n" ); 
			}
		} catch( IOException e ) {
			System.err.println( e );
		}
	}
} Main public static void main(String[] args) {
		BufferedReader kb = new BufferedReader( new InputStreamReader( System.in ) );
		try {
			String str = kb.readLine();
			String[] tmpArr = str.split( " " );
			int n = Integer.parseInt( tmpArr[0] );
			int m = Integer.parseInt( tmpArr[1] );
						
			int[][] a = new int[n][m];
			int[] b = new int[m];
			int c;


			for( int i=0; i<n; i++ ) {
				str = kb.readLine();
				tmpArr = str.split( " " );
				for( int j=0; j<m; j++ ) {
					a[i][j]=Integer.parseInt( tmpArr[j] );
				}
			}
			for( int j=0; j<m; j++ ) {
				str = kb.readLine();
				b[j]=Integer.parseInt( str );
			}
			
			for( int i=0; i<n; i++ ) {
				c=0;
				for( int j=0; j<m; j++ ) {
					c+=a[i][j]*b[j];
				}
				System.out.print( c+"\n" ); 
			}
		} catch( IOException e ) {
			System.err.println( e );
		}
	} main {
		BufferedReader kb = new BufferedReader( new InputStreamReader( System.in ) );
		try {
			String str = kb.readLine();
			String[] tmpArr = str.split( " " );
			int n = Integer.parseInt( tmpArr[0] );
			int m = Integer.parseInt( tmpArr[1] );
						
			int[][] a = new int[n][m];
			int[] b = new int[m];
			int c;


			for( int i=0; i<n; i++ ) {
				str = kb.readLine();
				tmpArr = str.split( " " );
				for( int j=0; j<m; j++ ) {
					a[i][j]=Integer.parseInt( tmpArr[j] );
				}
			}
			for( int j=0; j<m; j++ ) {
				str = kb.readLine();
				b[j]=Integer.parseInt( str );
			}
			
			for( int i=0; i<n; i++ ) {
				c=0;
				for( int j=0; j<m; j++ ) {
					c+=a[i][j]*b[j];
				}
				System.out.print( c+"\n" ); 
			}
		} catch( IOException e ) {
			System.err.println( e );
		}
	} BufferedReader kb = new BufferedReader( new InputStreamReader( System.in ) ); kb new BufferedReader( new InputStreamReader( System.in ) ) try {
			String str = kb.readLine();
			String[] tmpArr = str.split( " " );
			int n = Integer.parseInt( tmpArr[0] );
			int m = Integer.parseInt( tmpArr[1] );
						
			int[][] a = new int[n][m];
			int[] b = new int[m];
			int c;


			for( int i=0; i<n; i++ ) {
				str = kb.readLine();
				tmpArr = str.split( " " );
				for( int j=0; j<m; j++ ) {
					a[i][j]=Integer.parseInt( tmpArr[j] );
				}
			}
			for( int j=0; j<m; j++ ) {
				str = kb.readLine();
				b[j]=Integer.parseInt( str );
			}
			
			for( int i=0; i<n; i++ ) {
				c=0;
				for( int j=0; j<m; j++ ) {
					c+=a[i][j]*b[j];
				}
				System.out.print( c+"\n" ); 
			}
		} catch( IOException e ) {
			System.err.println( e );
		} catch( IOException e ) {
			System.err.println( e );
		} IOException e {
			System.err.println( e );
		} System.err.println( e ) System.err.println System.err System System.err e {
			String str = kb.readLine();
			String[] tmpArr = str.split( " " );
			int n = Integer.parseInt( tmpArr[0] );
			int m = Integer.parseInt( tmpArr[1] );
						
			int[][] a = new int[n][m];
			int[] b = new int[m];
			int c;


			for( int i=0; i<n; i++ ) {
				str = kb.readLine();
				tmpArr = str.split( " " );
				for( int j=0; j<m; j++ ) {
					a[i][j]=Integer.parseInt( tmpArr[j] );
				}
			}
			for( int j=0; j<m; j++ ) {
				str = kb.readLine();
				b[j]=Integer.parseInt( str );
			}
			
			for( int i=0; i<n; i++ ) {
				c=0;
				for( int j=0; j<m; j++ ) {
					c+=a[i][j]*b[j];
				}
				System.out.print( c+"\n" ); 
			}
		} String str = kb.readLine(); str kb.readLine() kb.readLine kb String[] tmpArr = str.split( " " ); tmpArr str.split( " " ) str.split str " " int n = Integer.parseInt( tmpArr[0] ); n Integer.parseInt( tmpArr[0] ) Integer.parseInt Integer tmpArr[0] tmpArr 0 int m = Integer.parseInt( tmpArr[1] ); m Integer.parseInt( tmpArr[1] ) Integer.parseInt Integer tmpArr[1] tmpArr 1 int[][] a = new int[n][m]; a new int[n][m] n m int[] b = new int[m]; b new int[m] m int c; c for( int i=0; i<n; i++ ) {
				str = kb.readLine();
				tmpArr = str.split( " " );
				for( int j=0; j<m; j++ ) {
					a[i][j]=Integer.parseInt( tmpArr[j] );
				}
			} int i=0; int i=0; i 0 i<n i n i++ i++ i {
				str = kb.readLine();
				tmpArr = str.split( " " );
				for( int j=0; j<m; j++ ) {
					a[i][j]=Integer.parseInt( tmpArr[j] );
				}
			} {
				str = kb.readLine();
				tmpArr = str.split( " " );
				for( int j=0; j<m; j++ ) {
					a[i][j]=Integer.parseInt( tmpArr[j] );
				}
			} str = kb.readLine() str kb.readLine() kb.readLine kb tmpArr = str.split( " " ) tmpArr str.split( " " ) str.split str " " for( int j=0; j<m; j++ ) {
					a[i][j]=Integer.parseInt( tmpArr[j] );
				} int j=0; int j=0; j 0 j<m j m j++ j++ j {
					a[i][j]=Integer.parseInt( tmpArr[j] );
				} {
					a[i][j]=Integer.parseInt( tmpArr[j] );
				} a[i][j]=Integer.parseInt( tmpArr[j] ) a[i][j] a[i] a i j Integer.parseInt( tmpArr[j] ) Integer.parseInt Integer tmpArr[j] tmpArr j for( int j=0; j<m; j++ ) {
				str = kb.readLine();
				b[j]=Integer.parseInt( str );
			} int j=0; int j=0; j 0 j<m j m j++ j++ j {
				str = kb.readLine();
				b[j]=Integer.parseInt( str );
			} {
				str = kb.readLine();
				b[j]=Integer.parseInt( str );
			} str = kb.readLine() str kb.readLine() kb.readLine kb b[j]=Integer.parseInt( str ) b[j] b j Integer.parseInt( str ) Integer.parseInt Integer str for( int i=0; i<n; i++ ) {
				c=0;
				for( int j=0; j<m; j++ ) {
					c+=a[i][j]*b[j];
				}
				System.out.print( c+"\n" ); 
			} int i=0; int i=0; i 0 i<n i n i++ i++ i {
				c=0;
				for( int j=0; j<m; j++ ) {
					c+=a[i][j]*b[j];
				}
				System.out.print( c+"\n" ); 
			} {
				c=0;
				for( int j=0; j<m; j++ ) {
					c+=a[i][j]*b[j];
				}
				System.out.print( c+"\n" ); 
			} c=0 c 0 for( int j=0; j<m; j++ ) {
					c+=a[i][j]*b[j];
				} int j=0; int j=0; j 0 j<m j m j++ j++ j {
					c+=a[i][j]*b[j];
				} {
					c+=a[i][j]*b[j];
				} c+=a[i][j]*b[j] c a[i][j]*b[j] a[i][j] a[i] a i j b[j] b j System.out.print( c+"\n" ) System.out.print System.out System System.out c+"\n" c "\n" String[] args args
import java.io.*;

class Main {
	public static void main(String[] args) {
		BufferedReader kb = new BufferedReader( new InputStreamReader( System.in ) );
		try {
			String str = kb.readLine();
			String[] tmpArr = str.split( " " );
			int n = Integer.parseInt( tmpArr[0] );
			int m = Integer.parseInt( tmpArr[1] );
						
			int[][] a = new int[n][m];
			int[] b = new int[m];
			int c;


			for( int i=0; i<n; i++ ) {
				str = kb.readLine();
				tmpArr = str.split( " " );
				for( int j=0; j<m; j++ ) {
					a[i][j]=Integer.parseInt( tmpArr[j] );
				}
			}
			for( int j=0; j<m; j++ ) {
				str = kb.readLine();
				b[j]=Integer.parseInt( str );
			}
			
			for( int i=0; i<n; i++ ) {
				c=0;
				for( int j=0; j<m; j++ ) {
					c+=a[i][j]*b[j];
				}
				System.out.print( c+"\n" ); 
			}
		} catch( IOException e ) {
			System.err.println( e );
		}
	}
}