import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.ArrayList;

public class Main {
    public static void main(String[] args) {
        try {
            BufferedReader stdReader = new BufferedReader(new InputStreamReader(System.in));
            
            String line;
            int count = 0;
            int nc = 0;
            int mc = 0;
            int n = 1;
            int m = 1;
            ArrayList<Integer> matrix = new ArrayList<Integer>();
            ArrayList<Integer> vector = new ArrayList<Integer>();
            
            while((line = stdReader.readLine()) != null) {
                // ????????????n??¨m?????????
                if(count == 0) {
                    String[] array = line.split(" ", 0);
                    n = Integer.parseInt(array[0]);
                    m = Integer.parseInt(array[1]);
                    count++;
                    continue;
                }
                
                // ?????????????????????
                if(nc < n) {
                    String[] row = line.split(" ", 0);
                    for(int i = 0; i < m; i++) {
                       matrix.add(Integer.parseInt(row[i]));
                    }
                    nc++;
                    continue;
                }
                
                // ???????????????????????????
                if(mc < m) {
                    vector.add(Integer.parseInt(line));
                    mc++;
                    if(mc != m) {
                        continue;
                    }
                }
                int c = 0;
                for(int i = 0; i < n; i++) {
                    int ans = 0;
                    for(int j = 0; j < m; j++) {
                        ans += matrix.get(c) * vector.get(j);
                        c++;
                    }
                    System.out.println(ans);
                }
                count = 0;
                nc = 0;
                mc = 0;
                matrix.clear();
                vector.clear();
            }
            stdReader.close();
        } catch(Exception e) {
            System.out.println(e);
            e.getStackTrace();
            System.exit(-1);
        }
    }
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.ArrayList; ArrayList java.util public class Main {
    public static void main(String[] args) {
        try {
            BufferedReader stdReader = new BufferedReader(new InputStreamReader(System.in));
            
            String line;
            int count = 0;
            int nc = 0;
            int mc = 0;
            int n = 1;
            int m = 1;
            ArrayList<Integer> matrix = new ArrayList<Integer>();
            ArrayList<Integer> vector = new ArrayList<Integer>();
            
            while((line = stdReader.readLine()) != null) {
                // ????????????n??¨m?????????
                if(count == 0) {
                    String[] array = line.split(" ", 0);
                    n = Integer.parseInt(array[0]);
                    m = Integer.parseInt(array[1]);
                    count++;
                    continue;
                }
                
                // ?????????????????????
                if(nc < n) {
                    String[] row = line.split(" ", 0);
                    for(int i = 0; i < m; i++) {
                       matrix.add(Integer.parseInt(row[i]));
                    }
                    nc++;
                    continue;
                }
                
                // ???????????????????????????
                if(mc < m) {
                    vector.add(Integer.parseInt(line));
                    mc++;
                    if(mc != m) {
                        continue;
                    }
                }
                int c = 0;
                for(int i = 0; i < n; i++) {
                    int ans = 0;
                    for(int j = 0; j < m; j++) {
                        ans += matrix.get(c) * vector.get(j);
                        c++;
                    }
                    System.out.println(ans);
                }
                count = 0;
                nc = 0;
                mc = 0;
                matrix.clear();
                vector.clear();
            }
            stdReader.close();
        } catch(Exception e) {
            System.out.println(e);
            e.getStackTrace();
            System.exit(-1);
        }
    }
} Main public static void main(String[] args) {
        try {
            BufferedReader stdReader = new BufferedReader(new InputStreamReader(System.in));
            
            String line;
            int count = 0;
            int nc = 0;
            int mc = 0;
            int n = 1;
            int m = 1;
            ArrayList<Integer> matrix = new ArrayList<Integer>();
            ArrayList<Integer> vector = new ArrayList<Integer>();
            
            while((line = stdReader.readLine()) != null) {
                // ????????????n??¨m?????????
                if(count == 0) {
                    String[] array = line.split(" ", 0);
                    n = Integer.parseInt(array[0]);
                    m = Integer.parseInt(array[1]);
                    count++;
                    continue;
                }
                
                // ?????????????????????
                if(nc < n) {
                    String[] row = line.split(" ", 0);
                    for(int i = 0; i < m; i++) {
                       matrix.add(Integer.parseInt(row[i]));
                    }
                    nc++;
                    continue;
                }
                
                // ???????????????????????????
                if(mc < m) {
                    vector.add(Integer.parseInt(line));
                    mc++;
                    if(mc != m) {
                        continue;
                    }
                }
                int c = 0;
                for(int i = 0; i < n; i++) {
                    int ans = 0;
                    for(int j = 0; j < m; j++) {
                        ans += matrix.get(c) * vector.get(j);
                        c++;
                    }
                    System.out.println(ans);
                }
                count = 0;
                nc = 0;
                mc = 0;
                matrix.clear();
                vector.clear();
            }
            stdReader.close();
        } catch(Exception e) {
            System.out.println(e);
            e.getStackTrace();
            System.exit(-1);
        }
    } main {
        try {
            BufferedReader stdReader = new BufferedReader(new InputStreamReader(System.in));
            
            String line;
            int count = 0;
            int nc = 0;
            int mc = 0;
            int n = 1;
            int m = 1;
            ArrayList<Integer> matrix = new ArrayList<Integer>();
            ArrayList<Integer> vector = new ArrayList<Integer>();
            
            while((line = stdReader.readLine()) != null) {
                // ????????????n??¨m?????????
                if(count == 0) {
                    String[] array = line.split(" ", 0);
                    n = Integer.parseInt(array[0]);
                    m = Integer.parseInt(array[1]);
                    count++;
                    continue;
                }
                
                // ?????????????????????
                if(nc < n) {
                    String[] row = line.split(" ", 0);
                    for(int i = 0; i < m; i++) {
                       matrix.add(Integer.parseInt(row[i]));
                    }
                    nc++;
                    continue;
                }
                
                // ???????????????????????????
                if(mc < m) {
                    vector.add(Integer.parseInt(line));
                    mc++;
                    if(mc != m) {
                        continue;
                    }
                }
                int c = 0;
                for(int i = 0; i < n; i++) {
                    int ans = 0;
                    for(int j = 0; j < m; j++) {
                        ans += matrix.get(c) * vector.get(j);
                        c++;
                    }
                    System.out.println(ans);
                }
                count = 0;
                nc = 0;
                mc = 0;
                matrix.clear();
                vector.clear();
            }
            stdReader.close();
        } catch(Exception e) {
            System.out.println(e);
            e.getStackTrace();
            System.exit(-1);
        }
    } try {
            BufferedReader stdReader = new BufferedReader(new InputStreamReader(System.in));
            
            String line;
            int count = 0;
            int nc = 0;
            int mc = 0;
            int n = 1;
            int m = 1;
            ArrayList<Integer> matrix = new ArrayList<Integer>();
            ArrayList<Integer> vector = new ArrayList<Integer>();
            
            while((line = stdReader.readLine()) != null) {
                // ????????????n??¨m?????????
                if(count == 0) {
                    String[] array = line.split(" ", 0);
                    n = Integer.parseInt(array[0]);
                    m = Integer.parseInt(array[1]);
                    count++;
                    continue;
                }
                
                // ?????????????????????
                if(nc < n) {
                    String[] row = line.split(" ", 0);
                    for(int i = 0; i < m; i++) {
                       matrix.add(Integer.parseInt(row[i]));
                    }
                    nc++;
                    continue;
                }
                
                // ???????????????????????????
                if(mc < m) {
                    vector.add(Integer.parseInt(line));
                    mc++;
                    if(mc != m) {
                        continue;
                    }
                }
                int c = 0;
                for(int i = 0; i < n; i++) {
                    int ans = 0;
                    for(int j = 0; j < m; j++) {
                        ans += matrix.get(c) * vector.get(j);
                        c++;
                    }
                    System.out.println(ans);
                }
                count = 0;
                nc = 0;
                mc = 0;
                matrix.clear();
                vector.clear();
            }
            stdReader.close();
        } catch(Exception e) {
            System.out.println(e);
            e.getStackTrace();
            System.exit(-1);
        } catch(Exception e) {
            System.out.println(e);
            e.getStackTrace();
            System.exit(-1);
        } Exception e {
            System.out.println(e);
            e.getStackTrace();
            System.exit(-1);
        } System.out.println(e) System.out.println System.out System System.out e e.getStackTrace() e.getStackTrace e System.exit(-1) System.exit System -1 1 {
            BufferedReader stdReader = new BufferedReader(new InputStreamReader(System.in));
            
            String line;
            int count = 0;
            int nc = 0;
            int mc = 0;
            int n = 1;
            int m = 1;
            ArrayList<Integer> matrix = new ArrayList<Integer>();
            ArrayList<Integer> vector = new ArrayList<Integer>();
            
            while((line = stdReader.readLine()) != null) {
                // ????????????n??¨m?????????
                if(count == 0) {
                    String[] array = line.split(" ", 0);
                    n = Integer.parseInt(array[0]);
                    m = Integer.parseInt(array[1]);
                    count++;
                    continue;
                }
                
                // ?????????????????????
                if(nc < n) {
                    String[] row = line.split(" ", 0);
                    for(int i = 0; i < m; i++) {
                       matrix.add(Integer.parseInt(row[i]));
                    }
                    nc++;
                    continue;
                }
                
                // ???????????????????????????
                if(mc < m) {
                    vector.add(Integer.parseInt(line));
                    mc++;
                    if(mc != m) {
                        continue;
                    }
                }
                int c = 0;
                for(int i = 0; i < n; i++) {
                    int ans = 0;
                    for(int j = 0; j < m; j++) {
                        ans += matrix.get(c) * vector.get(j);
                        c++;
                    }
                    System.out.println(ans);
                }
                count = 0;
                nc = 0;
                mc = 0;
                matrix.clear();
                vector.clear();
            }
            stdReader.close();
        } BufferedReader stdReader = new BufferedReader(new InputStreamReader(System.in)); stdReader new BufferedReader(new InputStreamReader(System.in)) String line; line int count = 0; count 0 int nc = 0; nc 0 int mc = 0; mc 0 int n = 1; n 1 int m = 1; m 1 ArrayList<Integer> matrix = new ArrayList<Integer>(); matrix new ArrayList<Integer>() ArrayList<Integer> vector = new ArrayList<Integer>(); vector new ArrayList<Integer>() while((line = stdReader.readLine()) != null) {
                // ????????????n??¨m?????????
                if(count == 0) {
                    String[] array = line.split(" ", 0);
                    n = Integer.parseInt(array[0]);
                    m = Integer.parseInt(array[1]);
                    count++;
                    continue;
                }
                
                // ?????????????????????
                if(nc < n) {
                    String[] row = line.split(" ", 0);
                    for(int i = 0; i < m; i++) {
                       matrix.add(Integer.parseInt(row[i]));
                    }
                    nc++;
                    continue;
                }
                
                // ???????????????????????????
                if(mc < m) {
                    vector.add(Integer.parseInt(line));
                    mc++;
                    if(mc != m) {
                        continue;
                    }
                }
                int c = 0;
                for(int i = 0; i < n; i++) {
                    int ans = 0;
                    for(int j = 0; j < m; j++) {
                        ans += matrix.get(c) * vector.get(j);
                        c++;
                    }
                    System.out.println(ans);
                }
                count = 0;
                nc = 0;
                mc = 0;
                matrix.clear();
                vector.clear();
            } (line = stdReader.readLine()) != null (line = stdReader.readLine()) line stdReader.readLine() stdReader.readLine stdReader null {
                // ????????????n??¨m?????????
                if(count == 0) {
                    String[] array = line.split(" ", 0);
                    n = Integer.parseInt(array[0]);
                    m = Integer.parseInt(array[1]);
                    count++;
                    continue;
                }
                
                // ?????????????????????
                if(nc < n) {
                    String[] row = line.split(" ", 0);
                    for(int i = 0; i < m; i++) {
                       matrix.add(Integer.parseInt(row[i]));
                    }
                    nc++;
                    continue;
                }
                
                // ???????????????????????????
                if(mc < m) {
                    vector.add(Integer.parseInt(line));
                    mc++;
                    if(mc != m) {
                        continue;
                    }
                }
                int c = 0;
                for(int i = 0; i < n; i++) {
                    int ans = 0;
                    for(int j = 0; j < m; j++) {
                        ans += matrix.get(c) * vector.get(j);
                        c++;
                    }
                    System.out.println(ans);
                }
                count = 0;
                nc = 0;
                mc = 0;
                matrix.clear();
                vector.clear();
            } if(count == 0) {
                    String[] array = line.split(" ", 0);
                    n = Integer.parseInt(array[0]);
                    m = Integer.parseInt(array[1]);
                    count++;
                    continue;
                } count == 0 count 0 {
                    String[] array = line.split(" ", 0);
                    n = Integer.parseInt(array[0]);
                    m = Integer.parseInt(array[1]);
                    count++;
                    continue;
                } String[] array = line.split(" ", 0); array line.split(" ", 0) line.split line " " 0 n = Integer.parseInt(array[0]) n Integer.parseInt(array[0]) Integer.parseInt Integer array[0] array 0 m = Integer.parseInt(array[1]) m Integer.parseInt(array[1]) Integer.parseInt Integer array[1] array 1 count++ count continue; if(nc < n) {
                    String[] row = line.split(" ", 0);
                    for(int i = 0; i < m; i++) {
                       matrix.add(Integer.parseInt(row[i]));
                    }
                    nc++;
                    continue;
                } nc < n nc n {
                    String[] row = line.split(" ", 0);
                    for(int i = 0; i < m; i++) {
                       matrix.add(Integer.parseInt(row[i]));
                    }
                    nc++;
                    continue;
                } String[] row = line.split(" ", 0); row line.split(" ", 0) line.split line " " 0 for(int i = 0; i < m; i++) {
                       matrix.add(Integer.parseInt(row[i]));
                    } int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
                       matrix.add(Integer.parseInt(row[i]));
                    } {
                       matrix.add(Integer.parseInt(row[i]));
                    } matrix.add(Integer.parseInt(row[i])) matrix.add matrix Integer.parseInt(row[i]) Integer.parseInt Integer row[i] row i nc++ nc continue; if(mc < m) {
                    vector.add(Integer.parseInt(line));
                    mc++;
                    if(mc != m) {
                        continue;
                    }
                } mc < m mc m {
                    vector.add(Integer.parseInt(line));
                    mc++;
                    if(mc != m) {
                        continue;
                    }
                } vector.add(Integer.parseInt(line)) vector.add vector Integer.parseInt(line) Integer.parseInt Integer line mc++ mc if(mc != m) {
                        continue;
                    } mc != m mc m {
                        continue;
                    } continue; int c = 0; c 0 for(int i = 0; i < n; i++) {
                    int ans = 0;
                    for(int j = 0; j < m; j++) {
                        ans += matrix.get(c) * vector.get(j);
                        c++;
                    }
                    System.out.println(ans);
                } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
                    int ans = 0;
                    for(int j = 0; j < m; j++) {
                        ans += matrix.get(c) * vector.get(j);
                        c++;
                    }
                    System.out.println(ans);
                } {
                    int ans = 0;
                    for(int j = 0; j < m; j++) {
                        ans += matrix.get(c) * vector.get(j);
                        c++;
                    }
                    System.out.println(ans);
                } int ans = 0; ans 0 for(int j = 0; j < m; j++) {
                        ans += matrix.get(c) * vector.get(j);
                        c++;
                    } int j = 0; int j = 0; j 0 j < m j m j++ j++ j {
                        ans += matrix.get(c) * vector.get(j);
                        c++;
                    } {
                        ans += matrix.get(c) * vector.get(j);
                        c++;
                    } ans += matrix.get(c) * vector.get(j) ans matrix.get(c) * vector.get(j) matrix.get(c) matrix.get matrix c vector.get(j) vector.get vector j c++ c System.out.println(ans) System.out.println System.out System System.out ans count = 0 count 0 nc = 0 nc 0 mc = 0 mc 0 matrix.clear() matrix.clear matrix vector.clear() vector.clear vector stdReader.close() stdReader.close stdReader String[] args args public class Main {
    public static void main(String[] args) {
        try {
            BufferedReader stdReader = new BufferedReader(new InputStreamReader(System.in));
            
            String line;
            int count = 0;
            int nc = 0;
            int mc = 0;
            int n = 1;
            int m = 1;
            ArrayList<Integer> matrix = new ArrayList<Integer>();
            ArrayList<Integer> vector = new ArrayList<Integer>();
            
            while((line = stdReader.readLine()) != null) {
                // ????????????n??¨m?????????
                if(count == 0) {
                    String[] array = line.split(" ", 0);
                    n = Integer.parseInt(array[0]);
                    m = Integer.parseInt(array[1]);
                    count++;
                    continue;
                }
                
                // ?????????????????????
                if(nc < n) {
                    String[] row = line.split(" ", 0);
                    for(int i = 0; i < m; i++) {
                       matrix.add(Integer.parseInt(row[i]));
                    }
                    nc++;
                    continue;
                }
                
                // ???????????????????????????
                if(mc < m) {
                    vector.add(Integer.parseInt(line));
                    mc++;
                    if(mc != m) {
                        continue;
                    }
                }
                int c = 0;
                for(int i = 0; i < n; i++) {
                    int ans = 0;
                    for(int j = 0; j < m; j++) {
                        ans += matrix.get(c) * vector.get(j);
                        c++;
                    }
                    System.out.println(ans);
                }
                count = 0;
                nc = 0;
                mc = 0;
                matrix.clear();
                vector.clear();
            }
            stdReader.close();
        } catch(Exception e) {
            System.out.println(e);
            e.getStackTrace();
            System.exit(-1);
        }
    }
} public class Main {
    public static void main(String[] args) {
        try {
            BufferedReader stdReader = new BufferedReader(new InputStreamReader(System.in));
            
            String line;
            int count = 0;
            int nc = 0;
            int mc = 0;
            int n = 1;
            int m = 1;
            ArrayList<Integer> matrix = new ArrayList<Integer>();
            ArrayList<Integer> vector = new ArrayList<Integer>();
            
            while((line = stdReader.readLine()) != null) {
                // ????????????n??¨m?????????
                if(count == 0) {
                    String[] array = line.split(" ", 0);
                    n = Integer.parseInt(array[0]);
                    m = Integer.parseInt(array[1]);
                    count++;
                    continue;
                }
                
                // ?????????????????????
                if(nc < n) {
                    String[] row = line.split(" ", 0);
                    for(int i = 0; i < m; i++) {
                       matrix.add(Integer.parseInt(row[i]));
                    }
                    nc++;
                    continue;
                }
                
                // ???????????????????????????
                if(mc < m) {
                    vector.add(Integer.parseInt(line));
                    mc++;
                    if(mc != m) {
                        continue;
                    }
                }
                int c = 0;
                for(int i = 0; i < n; i++) {
                    int ans = 0;
                    for(int j = 0; j < m; j++) {
                        ans += matrix.get(c) * vector.get(j);
                        c++;
                    }
                    System.out.println(ans);
                }
                count = 0;
                nc = 0;
                mc = 0;
                matrix.clear();
                vector.clear();
            }
            stdReader.close();
        } catch(Exception e) {
            System.out.println(e);
            e.getStackTrace();
            System.exit(-1);
        }
    }
} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.ArrayList;

public class Main {
    public static void main(String[] args) {
        try {
            BufferedReader stdReader = new BufferedReader(new InputStreamReader(System.in));
            
            String line;
            int count = 0;
            int nc = 0;
            int mc = 0;
            int n = 1;
            int m = 1;
            ArrayList<Integer> matrix = new ArrayList<Integer>();
            ArrayList<Integer> vector = new ArrayList<Integer>();
            
            while((line = stdReader.readLine()) != null) {
                // ????????????n??¨m?????????
                if(count == 0) {
                    String[] array = line.split(" ", 0);
                    n = Integer.parseInt(array[0]);
                    m = Integer.parseInt(array[1]);
                    count++;
                    continue;
                }
                
                // ?????????????????????
                if(nc < n) {
                    String[] row = line.split(" ", 0);
                    for(int i = 0; i < m; i++) {
                       matrix.add(Integer.parseInt(row[i]));
                    }
                    nc++;
                    continue;
                }
                
                // ???????????????????????????
                if(mc < m) {
                    vector.add(Integer.parseInt(line));
                    mc++;
                    if(mc != m) {
                        continue;
                    }
                }
                int c = 0;
                for(int i = 0; i < n; i++) {
                    int ans = 0;
                    for(int j = 0; j < m; j++) {
                        ans += matrix.get(c) * vector.get(j);
                        c++;
                    }
                    System.out.println(ans);
                }
                count = 0;
                nc = 0;
                mc = 0;
                matrix.clear();
                vector.clear();
            }
            stdReader.close();
        } catch(Exception e) {
            System.out.println(e);
            e.getStackTrace();
            System.exit(-1);
        }
    }
}