"""
Title     : Inner and Outer
Subdomain : Numpy
Domain    : Python
Author    : Ahmedur Rahman Shovon
Created   : 15 July 2016
Problem   : https://www.hackerrank.com/challenges/np-inner-and-outer/problem
"""
import numpy

np_ar1 = numpy.array(list(map(int, input().split())))
np_ar2 = numpy.array(list(map(int, input().split())))
print(numpy.inner(np_ar1, np_ar2))
print(numpy.outer(np_ar1, np_ar2))

0dfa16b571ba8295f41f41b853ed789c309f349a
<mask token>

<mask token>
print(numpy.inner(np_ar1, np_ar2))
print(numpy.outer(np_ar1, np_ar2))

<mask token>
np_ar1 = numpy.array(list(map(int, input().split())))
np_ar2 = numpy.array(list(map(int, input().split())))
print(numpy.inner(np_ar1, np_ar2))
print(numpy.outer(np_ar1, np_ar2))

<mask token>
import numpy
np_ar1 = numpy.array(list(map(int, input().split())))
np_ar2 = numpy.array(list(map(int, input().split())))
print(numpy.inner(np_ar1, np_ar2))
print(numpy.outer(np_ar1, np_ar2))

"""
Title     : Inner and Outer
Subdomain : Numpy
Domain    : Python
Author    : Ahmedur Rahman Shovon
Created   : 15 July 2016
Problem   : https://www.hackerrank.com/challenges/np-inner-and-outer/problem
"""
import numpy

np_ar1 = numpy.array(list(map(int, input().split())))
np_ar2 = numpy.array(list(map(int, input().split())))
print(numpy.inner(np_ar1, np_ar2))
print(numpy.outer(np_ar1, np_ar2))
