import java.util.Scanner;

public class Main {
    public static Scanner sc = new Scanner(System.in);
    public static void main(String[] args) throws Exception {
        int n = sc.nextInt();
        int m = sc.nextInt();
        int[][] mat = new int[n][m];
        int[] vec = new int[m];
        int[] res = new int[n];
        
        for (int i = 0; i < n; i++) {
            for (int j = 0; j < m; j++) {
                mat[i][j] = sc.nextInt();
            }
        }
        
        for (int i = 0; i < m; i++) {
            vec[i] = sc.nextInt();
        }
        for (int i = 0; i < n; i++) {
            for (int j = 0; j < m; j++) {
                res[i] += mat[i][j] * vec[j];
            }
            System.out.println(res[i]);
        }
        
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static Scanner sc = new Scanner(System.in);
    public static void main(String[] args) throws Exception {
        int n = sc.nextInt();
        int m = sc.nextInt();
        int[][] mat = new int[n][m];
        int[] vec = new int[m];
        int[] res = new int[n];
        
        for (int i = 0; i < n; i++) {
            for (int j = 0; j < m; j++) {
                mat[i][j] = sc.nextInt();
            }
        }
        
        for (int i = 0; i < m; i++) {
            vec[i] = sc.nextInt();
        }
        for (int i = 0; i < n; i++) {
            for (int j = 0; j < m; j++) {
                res[i] += mat[i][j] * vec[j];
            }
            System.out.println(res[i]);
        }
        
    }
} Main public static Scanner sc = new Scanner(System.in); sc new Scanner(System.in) public static void main(String[] args) throws Exception {
        int n = sc.nextInt();
        int m = sc.nextInt();
        int[][] mat = new int[n][m];
        int[] vec = new int[m];
        int[] res = new int[n];
        
        for (int i = 0; i < n; i++) {
            for (int j = 0; j < m; j++) {
                mat[i][j] = sc.nextInt();
            }
        }
        
        for (int i = 0; i < m; i++) {
            vec[i] = sc.nextInt();
        }
        for (int i = 0; i < n; i++) {
            for (int j = 0; j < m; j++) {
                res[i] += mat[i][j] * vec[j];
            }
            System.out.println(res[i]);
        }
        
    } main {
        int n = sc.nextInt();
        int m = sc.nextInt();
        int[][] mat = new int[n][m];
        int[] vec = new int[m];
        int[] res = new int[n];
        
        for (int i = 0; i < n; i++) {
            for (int j = 0; j < m; j++) {
                mat[i][j] = sc.nextInt();
            }
        }
        
        for (int i = 0; i < m; i++) {
            vec[i] = sc.nextInt();
        }
        for (int i = 0; i < n; i++) {
            for (int j = 0; j < m; j++) {
                res[i] += mat[i][j] * vec[j];
            }
            System.out.println(res[i]);
        }
        
    } int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int m = sc.nextInt(); m sc.nextInt() sc.nextInt sc int[][] mat = new int[n][m]; mat new int[n][m] n m int[] vec = new int[m]; vec new int[m] m int[] res = new int[n]; res new int[n] n for (int i = 0; i < n; i++) {
            for (int j = 0; j < m; j++) {
                mat[i][j] = sc.nextInt();
            }
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            for (int j = 0; j < m; j++) {
                mat[i][j] = sc.nextInt();
            }
        } {
            for (int j = 0; j < m; j++) {
                mat[i][j] = sc.nextInt();
            }
        } for (int j = 0; j < m; j++) {
                mat[i][j] = sc.nextInt();
            } int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
                mat[i][j] = sc.nextInt();
            } {
                mat[i][j] = sc.nextInt();
            } mat[i][j] = sc.nextInt() mat[i][j] mat[i] mat i j sc.nextInt() sc.nextInt sc for (int i = 0; i < m; i++) {
            vec[i] = sc.nextInt();
        } int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
            vec[i] = sc.nextInt();
        } {
            vec[i] = sc.nextInt();
        } vec[i] = sc.nextInt() vec[i] vec i sc.nextInt() sc.nextInt sc for (int i = 0; i < n; i++) {
            for (int j = 0; j < m; j++) {
                res[i] += mat[i][j] * vec[j];
            }
            System.out.println(res[i]);
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            for (int j = 0; j < m; j++) {
                res[i] += mat[i][j] * vec[j];
            }
            System.out.println(res[i]);
        } {
            for (int j = 0; j < m; j++) {
                res[i] += mat[i][j] * vec[j];
            }
            System.out.println(res[i]);
        } for (int j = 0; j < m; j++) {
                res[i] += mat[i][j] * vec[j];
            } int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
                res[i] += mat[i][j] * vec[j];
            } {
                res[i] += mat[i][j] * vec[j];
            } res[i] += mat[i][j] * vec[j] res[i] res i mat[i][j] * vec[j] mat[i][j] mat[i] mat i j vec[j] vec j System.out.println(res[i]) System.out.println System.out System System.out res[i] res i String[] args args public class Main {
    public static Scanner sc = new Scanner(System.in);
    public static void main(String[] args) throws Exception {
        int n = sc.nextInt();
        int m = sc.nextInt();
        int[][] mat = new int[n][m];
        int[] vec = new int[m];
        int[] res = new int[n];
        
        for (int i = 0; i < n; i++) {
            for (int j = 0; j < m; j++) {
                mat[i][j] = sc.nextInt();
            }
        }
        
        for (int i = 0; i < m; i++) {
            vec[i] = sc.nextInt();
        }
        for (int i = 0; i < n; i++) {
            for (int j = 0; j < m; j++) {
                res[i] += mat[i][j] * vec[j];
            }
            System.out.println(res[i]);
        }
        
    }
} public class Main {
    public static Scanner sc = new Scanner(System.in);
    public static void main(String[] args) throws Exception {
        int n = sc.nextInt();
        int m = sc.nextInt();
        int[][] mat = new int[n][m];
        int[] vec = new int[m];
        int[] res = new int[n];
        
        for (int i = 0; i < n; i++) {
            for (int j = 0; j < m; j++) {
                mat[i][j] = sc.nextInt();
            }
        }
        
        for (int i = 0; i < m; i++) {
            vec[i] = sc.nextInt();
        }
        for (int i = 0; i < n; i++) {
            for (int j = 0; j < m; j++) {
                res[i] += mat[i][j] * vec[j];
            }
            System.out.println(res[i]);
        }
        
    }
} Main
import java.util.Scanner;

public class Main {
    public static Scanner sc = new Scanner(System.in);
    public static void main(String[] args) throws Exception {
        int n = sc.nextInt();
        int m = sc.nextInt();
        int[][] mat = new int[n][m];
        int[] vec = new int[m];
        int[] res = new int[n];
        
        for (int i = 0; i < n; i++) {
            for (int j = 0; j < m; j++) {
                mat[i][j] = sc.nextInt();
            }
        }
        
        for (int i = 0; i < m; i++) {
            vec[i] = sc.nextInt();
        }
        for (int i = 0; i < n; i++) {
            for (int j = 0; j < m; j++) {
                res[i] += mat[i][j] * vec[j];
            }
            System.out.println(res[i]);
        }
        
    }
}