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

class Main{
  public static void main(String args[]) throws IOException{
   int n,m;
   BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
   String line = br.readLine(); 
   String[] token = line.split(" ");
   n = Integer.parseInt(token[0]);
   m = Integer.parseInt(token[1]);
   int[][] matrixA = new int[n][m];
   int[] matrixB = new int[m];
   int[] matrixanswer = new int[n]; 

   for(int i = 0; i < n ;i++){
     String line2 = br.readLine(); 
     String[] token2 = line2.split(" ");
     for(int j = 0; j < m ;j++){
        matrixA[i][j] = Integer.parseInt(token2[j]);
        
     }//for  
   }//for

   for(int i = 0; i < m ;i++){
      matrixB[i] = Integer.parseInt(br.readLine());
   }

   for(int i = 0; i < n ;i++){
      matrixanswer[i] = 0;
   }   

  for(int i = 0; i < n ;i++){
      for(int j = 0; j < m ;j++){
        matrixanswer[i] += matrixA[i][j]*matrixB[j];
      }
   }

    for(int j = 0; j < n ;j++){
       System.out.println(matrixanswer[j]);
    }


  }
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io class Main{
  public static void main(String args[]) throws IOException{
   int n,m;
   BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
   String line = br.readLine(); 
   String[] token = line.split(" ");
   n = Integer.parseInt(token[0]);
   m = Integer.parseInt(token[1]);
   int[][] matrixA = new int[n][m];
   int[] matrixB = new int[m];
   int[] matrixanswer = new int[n]; 

   for(int i = 0; i < n ;i++){
     String line2 = br.readLine(); 
     String[] token2 = line2.split(" ");
     for(int j = 0; j < m ;j++){
        matrixA[i][j] = Integer.parseInt(token2[j]);
        
     }//for  
   }//for

   for(int i = 0; i < m ;i++){
      matrixB[i] = Integer.parseInt(br.readLine());
   }

   for(int i = 0; i < n ;i++){
      matrixanswer[i] = 0;
   }   

  for(int i = 0; i < n ;i++){
      for(int j = 0; j < m ;j++){
        matrixanswer[i] += matrixA[i][j]*matrixB[j];
      }
   }

    for(int j = 0; j < n ;j++){
       System.out.println(matrixanswer[j]);
    }


  }
} Main public static void main(String args[]) throws IOException{
   int n,m;
   BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
   String line = br.readLine(); 
   String[] token = line.split(" ");
   n = Integer.parseInt(token[0]);
   m = Integer.parseInt(token[1]);
   int[][] matrixA = new int[n][m];
   int[] matrixB = new int[m];
   int[] matrixanswer = new int[n]; 

   for(int i = 0; i < n ;i++){
     String line2 = br.readLine(); 
     String[] token2 = line2.split(" ");
     for(int j = 0; j < m ;j++){
        matrixA[i][j] = Integer.parseInt(token2[j]);
        
     }//for  
   }//for

   for(int i = 0; i < m ;i++){
      matrixB[i] = Integer.parseInt(br.readLine());
   }

   for(int i = 0; i < n ;i++){
      matrixanswer[i] = 0;
   }   

  for(int i = 0; i < n ;i++){
      for(int j = 0; j < m ;j++){
        matrixanswer[i] += matrixA[i][j]*matrixB[j];
      }
   }

    for(int j = 0; j < n ;j++){
       System.out.println(matrixanswer[j]);
    }


  } main {
   int n,m;
   BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
   String line = br.readLine(); 
   String[] token = line.split(" ");
   n = Integer.parseInt(token[0]);
   m = Integer.parseInt(token[1]);
   int[][] matrixA = new int[n][m];
   int[] matrixB = new int[m];
   int[] matrixanswer = new int[n]; 

   for(int i = 0; i < n ;i++){
     String line2 = br.readLine(); 
     String[] token2 = line2.split(" ");
     for(int j = 0; j < m ;j++){
        matrixA[i][j] = Integer.parseInt(token2[j]);
        
     }//for  
   }//for

   for(int i = 0; i < m ;i++){
      matrixB[i] = Integer.parseInt(br.readLine());
   }

   for(int i = 0; i < n ;i++){
      matrixanswer[i] = 0;
   }   

  for(int i = 0; i < n ;i++){
      for(int j = 0; j < m ;j++){
        matrixanswer[i] += matrixA[i][j]*matrixB[j];
      }
   }

    for(int j = 0; j < n ;j++){
       System.out.println(matrixanswer[j]);
    }


  } int n n m; m BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String line = br.readLine(); line br.readLine() br.readLine br String[] token = line.split(" "); token line.split(" ") line.split line " " n = Integer.parseInt(token[0]) n Integer.parseInt(token[0]) Integer.parseInt Integer token[0] token 0 m = Integer.parseInt(token[1]) m Integer.parseInt(token[1]) Integer.parseInt Integer token[1] token 1 int[][] matrixA = new int[n][m]; matrixA new int[n][m] n m int[] matrixB = new int[m]; matrixB new int[m] m int[] matrixanswer = new int[n]; matrixanswer new int[n] n for(int i = 0; i < n ;i++){
     String line2 = br.readLine(); 
     String[] token2 = line2.split(" ");
     for(int j = 0; j < m ;j++){
        matrixA[i][j] = Integer.parseInt(token2[j]);
        
     }//for  
   }//for int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
     String line2 = br.readLine(); 
     String[] token2 = line2.split(" ");
     for(int j = 0; j < m ;j++){
        matrixA[i][j] = Integer.parseInt(token2[j]);
        
     }//for  
   }//for {
     String line2 = br.readLine(); 
     String[] token2 = line2.split(" ");
     for(int j = 0; j < m ;j++){
        matrixA[i][j] = Integer.parseInt(token2[j]);
        
     }//for  
   } String line2 = br.readLine(); line2 br.readLine() br.readLine br String[] token2 = line2.split(" "); token2 line2.split(" ") line2.split line2 " " for(int j = 0; j < m ;j++){
        matrixA[i][j] = Integer.parseInt(token2[j]);
        
     }//for   int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
        matrixA[i][j] = Integer.parseInt(token2[j]);
        
     }//for   {
        matrixA[i][j] = Integer.parseInt(token2[j]);
        
     } matrixA[i][j] = Integer.parseInt(token2[j]) matrixA[i][j] matrixA[i] matrixA i j Integer.parseInt(token2[j]) Integer.parseInt Integer token2[j] token2 j for(int i = 0; i < m ;i++){
      matrixB[i] = Integer.parseInt(br.readLine());
   } int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
      matrixB[i] = Integer.parseInt(br.readLine());
   } {
      matrixB[i] = Integer.parseInt(br.readLine());
   } matrixB[i] = Integer.parseInt(br.readLine()) matrixB[i] matrixB i Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br for(int i = 0; i < n ;i++){
      matrixanswer[i] = 0;
   } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
      matrixanswer[i] = 0;
   } {
      matrixanswer[i] = 0;
   } matrixanswer[i] = 0 matrixanswer[i] matrixanswer i 0 for(int i = 0; i < n ;i++){
      for(int j = 0; j < m ;j++){
        matrixanswer[i] += matrixA[i][j]*matrixB[j];
      }
   } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
      for(int j = 0; j < m ;j++){
        matrixanswer[i] += matrixA[i][j]*matrixB[j];
      }
   } {
      for(int j = 0; j < m ;j++){
        matrixanswer[i] += matrixA[i][j]*matrixB[j];
      }
   } for(int j = 0; j < m ;j++){
        matrixanswer[i] += matrixA[i][j]*matrixB[j];
      } int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
        matrixanswer[i] += matrixA[i][j]*matrixB[j];
      } {
        matrixanswer[i] += matrixA[i][j]*matrixB[j];
      } matrixanswer[i] += matrixA[i][j]*matrixB[j] matrixanswer[i] matrixanswer i matrixA[i][j]*matrixB[j] matrixA[i][j] matrixA[i] matrixA i j matrixB[j] matrixB j for(int j = 0; j < n ;j++){
       System.out.println(matrixanswer[j]);
    } int j = 0; int j = 0; j 0 j < n j n j++ j++ j {
       System.out.println(matrixanswer[j]);
    } {
       System.out.println(matrixanswer[j]);
    } System.out.println(matrixanswer[j]) System.out.println System.out System System.out matrixanswer[j] matrixanswer j String args[] args
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

class Main{
  public static void main(String args[]) throws IOException{
   int n,m;
   BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
   String line = br.readLine(); 
   String[] token = line.split(" ");
   n = Integer.parseInt(token[0]);
   m = Integer.parseInt(token[1]);
   int[][] matrixA = new int[n][m];
   int[] matrixB = new int[m];
   int[] matrixanswer = new int[n]; 

   for(int i = 0; i < n ;i++){
     String line2 = br.readLine(); 
     String[] token2 = line2.split(" ");
     for(int j = 0; j < m ;j++){
        matrixA[i][j] = Integer.parseInt(token2[j]);
        
     }//for  
   }//for

   for(int i = 0; i < m ;i++){
      matrixB[i] = Integer.parseInt(br.readLine());
   }

   for(int i = 0; i < n ;i++){
      matrixanswer[i] = 0;
   }   

  for(int i = 0; i < n ;i++){
      for(int j = 0; j < m ;j++){
        matrixanswer[i] += matrixA[i][j]*matrixB[j];
      }
   }

    for(int j = 0; j < n ;j++){
       System.out.println(matrixanswer[j]);
    }


  }
}