import java.util.*;
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        ArrayList<Integer> A = new ArrayList<Integer>();

        int n = sc.nextInt();
        int m = sc.nextInt();
        int[][] B = new int[n][m];
        int[] C = new int[m];
        int[] D = new int[n];

        for (int i=0; i<n; i++) {
            for (int j=0; j<m; j++) {
                B[i][j] = sc.nextInt();
            }
        }
        for (int i=0; i<m; i++) {
            C[i] = sc.nextInt();
        }
        for (int i=0; i<n; i++) {
            for (int j=0; j<m; j++) {
                D[i] += B[i][j] * C[j];
            }
        }
        for (int i=0; i<n; i++) {
            System.out.println(D[i]);
        }


    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        ArrayList<Integer> A = new ArrayList<Integer>();

        int n = sc.nextInt();
        int m = sc.nextInt();
        int[][] B = new int[n][m];
        int[] C = new int[m];
        int[] D = new int[n];

        for (int i=0; i<n; i++) {
            for (int j=0; j<m; j++) {
                B[i][j] = sc.nextInt();
            }
        }
        for (int i=0; i<m; i++) {
            C[i] = sc.nextInt();
        }
        for (int i=0; i<n; i++) {
            for (int j=0; j<m; j++) {
                D[i] += B[i][j] * C[j];
            }
        }
        for (int i=0; i<n; i++) {
            System.out.println(D[i]);
        }


    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        ArrayList<Integer> A = new ArrayList<Integer>();

        int n = sc.nextInt();
        int m = sc.nextInt();
        int[][] B = new int[n][m];
        int[] C = new int[m];
        int[] D = new int[n];

        for (int i=0; i<n; i++) {
            for (int j=0; j<m; j++) {
                B[i][j] = sc.nextInt();
            }
        }
        for (int i=0; i<m; i++) {
            C[i] = sc.nextInt();
        }
        for (int i=0; i<n; i++) {
            for (int j=0; j<m; j++) {
                D[i] += B[i][j] * C[j];
            }
        }
        for (int i=0; i<n; i++) {
            System.out.println(D[i]);
        }


    } main {
        Scanner sc = new Scanner(System.in);
        ArrayList<Integer> A = new ArrayList<Integer>();

        int n = sc.nextInt();
        int m = sc.nextInt();
        int[][] B = new int[n][m];
        int[] C = new int[m];
        int[] D = new int[n];

        for (int i=0; i<n; i++) {
            for (int j=0; j<m; j++) {
                B[i][j] = sc.nextInt();
            }
        }
        for (int i=0; i<m; i++) {
            C[i] = sc.nextInt();
        }
        for (int i=0; i<n; i++) {
            for (int j=0; j<m; j++) {
                D[i] += B[i][j] * C[j];
            }
        }
        for (int i=0; i<n; i++) {
            System.out.println(D[i]);
        }


    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) ArrayList<Integer> A = new ArrayList<Integer>(); A new ArrayList<Integer>() int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int m = sc.nextInt(); m sc.nextInt() sc.nextInt sc int[][] B = new int[n][m]; B new int[n][m] n m int[] C = new int[m]; C new int[m] m int[] D = new int[n]; D new int[n] n for (int i=0; i<n; i++) {
            for (int j=0; j<m; j++) {
                B[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++) {
                B[i][j] = sc.nextInt();
            }
        } {
            for (int j=0; j<m; j++) {
                B[i][j] = sc.nextInt();
            }
        } for (int j=0; j<m; j++) {
                B[i][j] = sc.nextInt();
            } int j=0; int j=0; j 0 j<m j m j++ j++ j {
                B[i][j] = sc.nextInt();
            } {
                B[i][j] = sc.nextInt();
            } B[i][j] = sc.nextInt() B[i][j] B[i] B i j sc.nextInt() sc.nextInt sc for (int i=0; i<m; i++) {
            C[i] = sc.nextInt();
        } int i=0; int i=0; i 0 i<m i m i++ i++ i {
            C[i] = sc.nextInt();
        } {
            C[i] = sc.nextInt();
        } C[i] = sc.nextInt() C[i] C i sc.nextInt() sc.nextInt sc for (int i=0; i<n; i++) {
            for (int j=0; j<m; j++) {
                D[i] += B[i][j] * C[j];
            }
        } int i=0; int i=0; i 0 i<n i n i++ i++ i {
            for (int j=0; j<m; j++) {
                D[i] += B[i][j] * C[j];
            }
        } {
            for (int j=0; j<m; j++) {
                D[i] += B[i][j] * C[j];
            }
        } for (int j=0; j<m; j++) {
                D[i] += B[i][j] * C[j];
            } int j=0; int j=0; j 0 j<m j m j++ j++ j {
                D[i] += B[i][j] * C[j];
            } {
                D[i] += B[i][j] * C[j];
            } D[i] += B[i][j] * C[j] D[i] D i B[i][j] * C[j] B[i][j] B[i] B i j C[j] C j for (int i=0; i<n; i++) {
            System.out.println(D[i]);
        } int i=0; int i=0; i 0 i<n i n i++ i++ i {
            System.out.println(D[i]);
        } {
            System.out.println(D[i]);
        } System.out.println(D[i]) System.out.println System.out System System.out D[i] D i String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        ArrayList<Integer> A = new ArrayList<Integer>();

        int n = sc.nextInt();
        int m = sc.nextInt();
        int[][] B = new int[n][m];
        int[] C = new int[m];
        int[] D = new int[n];

        for (int i=0; i<n; i++) {
            for (int j=0; j<m; j++) {
                B[i][j] = sc.nextInt();
            }
        }
        for (int i=0; i<m; i++) {
            C[i] = sc.nextInt();
        }
        for (int i=0; i<n; i++) {
            for (int j=0; j<m; j++) {
                D[i] += B[i][j] * C[j];
            }
        }
        for (int i=0; i<n; i++) {
            System.out.println(D[i]);
        }


    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        ArrayList<Integer> A = new ArrayList<Integer>();

        int n = sc.nextInt();
        int m = sc.nextInt();
        int[][] B = new int[n][m];
        int[] C = new int[m];
        int[] D = new int[n];

        for (int i=0; i<n; i++) {
            for (int j=0; j<m; j++) {
                B[i][j] = sc.nextInt();
            }
        }
        for (int i=0; i<m; i++) {
            C[i] = sc.nextInt();
        }
        for (int i=0; i<n; i++) {
            for (int j=0; j<m; j++) {
                D[i] += B[i][j] * C[j];
            }
        }
        for (int i=0; i<n; i++) {
            System.out.println(D[i]);
        }


    }
} Main
import java.util.*;
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        ArrayList<Integer> A = new ArrayList<Integer>();

        int n = sc.nextInt();
        int m = sc.nextInt();
        int[][] B = new int[n][m];
        int[] C = new int[m];
        int[] D = new int[n];

        for (int i=0; i<n; i++) {
            for (int j=0; j<m; j++) {
                B[i][j] = sc.nextInt();
            }
        }
        for (int i=0; i<m; i++) {
            C[i] = sc.nextInt();
        }
        for (int i=0; i<n; i++) {
            for (int j=0; j<m; j++) {
                D[i] += B[i][j] * C[j];
            }
        }
        for (int i=0; i<n; i++) {
            System.out.println(D[i]);
        }


    }
}
