import numpy
n = int(input())
array_a = []
array_b = []
for i in range(n):
    a = list(map(int, input().split()))
    array_a.append(a)
for i in range(n):
    b = list(map(int, input().split()))
    array_b.append(b)
array_a = numpy.array(array_a)
array_b = numpy.array(array_b)
print(numpy.dot(array_a, array_b))

b5623cad90b2c4d14a2a7a505665abe6c953662e
<mask token>

<mask token>
for i in range(n):
    a = list(map(int, input().split()))
    array_a.append(a)
for i in range(n):
    b = list(map(int, input().split()))
    array_b.append(b)
<mask token>
print(numpy.dot(array_a, array_b))

<mask token>
n = int(input())
array_a = []
array_b = []
for i in range(n):
    a = list(map(int, input().split()))
    array_a.append(a)
for i in range(n):
    b = list(map(int, input().split()))
    array_b.append(b)
array_a = numpy.array(array_a)
array_b = numpy.array(array_b)
print(numpy.dot(array_a, array_b))

import numpy
n = int(input())
array_a = []
array_b = []
for i in range(n):
    a = list(map(int, input().split()))
    array_a.append(a)
for i in range(n):
    b = list(map(int, input().split()))
    array_b.append(b)
array_a = numpy.array(array_a)
array_b = numpy.array(array_b)
print(numpy.dot(array_a, array_b))
