import java.util.*;
import java.text.*;

class Main {
    public static void main(String[]args)throws Exception {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();
        int [][] a = new int[n][m];
        int [] b = new int[m];
        for(int i = 0; i < n; i++) {
            for(int j = 0; j < m; j++) {
                a[i][j] = sc.nextInt();
            }
        }
        for(int j = 0; j < m; j++) {
            b[j] = sc.nextInt();
        }
        int [] x = new int[n];
        for(int i = 0; i < n; i++) {
            for(int j = 0; j < m; j++) {
                x[i] += a[i][j]*b[j];
            }
        }
        for(int i = 0; i < n; i++) {
            System.out.println(x[i]);
        }
    }
} import java.util.*; util.* java import java.text.*; text.* java class Main {
    public static void main(String[]args)throws Exception {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();
        int [][] a = new int[n][m];
        int [] b = new int[m];
        for(int i = 0; i < n; i++) {
            for(int j = 0; j < m; j++) {
                a[i][j] = sc.nextInt();
            }
        }
        for(int j = 0; j < m; j++) {
            b[j] = sc.nextInt();
        }
        int [] x = new int[n];
        for(int i = 0; i < n; i++) {
            for(int j = 0; j < m; j++) {
                x[i] += a[i][j]*b[j];
            }
        }
        for(int i = 0; i < n; i++) {
            System.out.println(x[i]);
        }
    }
} Main public static void main(String[]args)throws Exception {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();
        int [][] a = new int[n][m];
        int [] b = new int[m];
        for(int i = 0; i < n; i++) {
            for(int j = 0; j < m; j++) {
                a[i][j] = sc.nextInt();
            }
        }
        for(int j = 0; j < m; j++) {
            b[j] = sc.nextInt();
        }
        int [] x = new int[n];
        for(int i = 0; i < n; i++) {
            for(int j = 0; j < m; j++) {
                x[i] += a[i][j]*b[j];
            }
        }
        for(int i = 0; i < n; i++) {
            System.out.println(x[i]);
        }
    } main {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();
        int [][] a = new int[n][m];
        int [] b = new int[m];
        for(int i = 0; i < n; i++) {
            for(int j = 0; j < m; j++) {
                a[i][j] = sc.nextInt();
            }
        }
        for(int j = 0; j < m; j++) {
            b[j] = sc.nextInt();
        }
        int [] x = new int[n];
        for(int i = 0; i < n; i++) {
            for(int j = 0; j < m; j++) {
                x[i] += a[i][j]*b[j];
            }
        }
        for(int i = 0; i < n; i++) {
            System.out.println(x[i]);
        }
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int m = sc.nextInt(); m sc.nextInt() sc.nextInt sc int [][] a = new int[n][m]; a new int[n][m] n m int [] b = new int[m]; b new int[m] m for(int i = 0; i < n; i++) {
            for(int j = 0; j < m; j++) {
                a[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++) {
                a[i][j] = sc.nextInt();
            }
        } {
            for(int j = 0; j < m; j++) {
                a[i][j] = sc.nextInt();
            }
        } for(int j = 0; j < m; j++) {
                a[i][j] = sc.nextInt();
            } int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
                a[i][j] = sc.nextInt();
            } {
                a[i][j] = sc.nextInt();
            } a[i][j] = sc.nextInt() a[i][j] a[i] a i j sc.nextInt() sc.nextInt sc for(int j = 0; j < m; j++) {
            b[j] = sc.nextInt();
        } int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
            b[j] = sc.nextInt();
        } {
            b[j] = sc.nextInt();
        } b[j] = sc.nextInt() b[j] b j sc.nextInt() sc.nextInt sc int [] x = new int[n]; x new int[n] n for(int i = 0; i < n; i++) {
            for(int j = 0; j < m; j++) {
                x[i] += a[i][j]*b[j];
            }
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            for(int j = 0; j < m; j++) {
                x[i] += a[i][j]*b[j];
            }
        } {
            for(int j = 0; j < m; j++) {
                x[i] += a[i][j]*b[j];
            }
        } for(int j = 0; j < m; j++) {
                x[i] += a[i][j]*b[j];
            } int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
                x[i] += a[i][j]*b[j];
            } {
                x[i] += a[i][j]*b[j];
            } x[i] += a[i][j]*b[j] x[i] x i a[i][j]*b[j] a[i][j] a[i] a i j b[j] b j for(int i = 0; i < n; i++) {
            System.out.println(x[i]);
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            System.out.println(x[i]);
        } {
            System.out.println(x[i]);
        } System.out.println(x[i]) System.out.println System.out System System.out x[i] x i String[]args args
import java.util.*;
import java.text.*;

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