CodeEff/ECCO huggingface dataset:
# Original solution
N, A, B = list(map(int, input().split()))

if (A - B) % 2 == 0:
    print((abs(A - B) // 2))
else:
    if A > B:
        A, B = B, A
    ret = abs(B - A - 1) // 2 + min(A, N - B + 1)
    print(ret)


# Optimized solution
n, a, b = list(map(int, input().split()))

if (a - b) % 2 == 0:
    print((abs(a - b) // 2))
else:
    print((min((a - 1) + 1, (n - b) + 1) + abs(b - a - 1) // 2))
# Original solution
n, a, b = list(map(int, input().split()))
if (a - 1) >= (n - b):
    count = (n-b)
    a = a + (n - b)
    b = n
else:
    count = (a - 1)
    b = b - (a - 1)
    a = 1
#print(count)
if ((b - a) % 2 == 0):
    print((min(min(b-1,n-a),(b-a)//2)))
elif a == 1 and (b - a) % 2 != 0:
    print((min(min(b - 1, n - a), (b - 1 - a) // 2 + 1) + count))
    #print(count)
elif b == n and (b - a) % 2 != 0:
    print((min(min(b - 1, n - a), (b - 1 - a) // 2 + 1)+count))
else:
    print((min(b-1,n-a)+count))

# Optimized solution
n, a, b = list(map(int, input().split()))
if (a - 1) >= (n - b):
    count = (n-b)
    a = a + (n - b)
    b = n
else:
    count = (a - 1)
    b = b - (a - 1)
    a = 1

if ((b - a) % 2 == 0):
    print((min(min(b-1,n-a),(b-a)//2)))
elif a == 1 and (b - a) % 2 != 0:
    print((min(min(b - 1, n - a), (b - 1 - a) // 2 + 1) + count))
elif b == n and (b - a) % 2 != 0:
    print((min(min(b - 1, n - a), (b - 1 - a) // 2 + 1)+count))
else:
    print((min(b-1,n-a)+count))
# Original solution
N,A,B = list(map(int,input().split()))
if (max(A,B)-min(A,B))%2==0:
    cnt = (max(A,B)-min(A,B))//2
else:
    cnt1 = min(max(A,B)-1,N-min(A,B))
    cnt2 = min(A,B)+(max(A,B)-min(A,B)-1)//2
    cnt3 = N-max(A,B)+1+(max(A,B)-min(A,B)-1)//2
    cnt = min(cnt1,cnt2,cnt3)
print(cnt)

# Optimized solution
N,A,B = list(map(int,input().split()))
if (B-A)%2==0:
    print(((B-A)//2))
else:
    if (A-1)<=(N-B):
        print((A+(B-A-1)//2))
    else:
        print((N-B+1+(B-A-1)//2))
# Original solution
N,A,B = list(map(int,input().split()))
if abs(B-A)%2==0:
    print((abs(B-A)//2))
elif A<B:
    print((min(A-1,N-B)+1+(B-A-1)//2))
else:
    print((min(B-1,N-A)+1+(A-B-1)//2))

# Optimized solution
N,A,B = list(map(int,input().split()))
if (B-A)%2==0:
    print(((B-A)//2))
else:
    print((min(A,N-B+1)+(B-A-1)//2))
# Original solution
N, A, B = list(map(int, input().split()))
if ((B-A)%2 == 0):
  print(((B-A)//2))
else: 
  print((min([A+(B-A-1)//2 ,N-B+ 1 +(B-A-1)//2])))

# Optimized solution
N, A, B = list(map(int,input().split()))
if ((A-B)%2==0):
  ans = abs(A-B)//2
elif (N-B <= A-1):
  ans = (2*N -A-B+1)//2
elif (N-B > A-1):
  ans = (B+A-1)//2
print(ans)
# Original solution
n, a, b = list(map(int, input().split()))
a = min(a, b)
b = max(a, b)

ret = 0
if (b - a) & 1:
    if n - a < b - 1:
        ret = n - b + 1
        a += ret
        b = n
    else:
        ret = a
        a = 1
        b -= ret
print((ret + (b - a) // 2))


# Optimized solution
n, a, b = list(map(int, input().split()))
if abs(b - a) & 1:
    l = (a - 1) + (b - 1) + 1
    r = (n - a) + (n - b) + 1
    x = min(l, r)
else:
    x = abs(b - a)
print((x // 2))
# Original solution
N, A, B = list(map(int, input().split()))
round_count = 0

med = N / 2 + 0.5
maxAB = 10 ** 18

Max = max([A, B])
Min = min([A, B])

for i in range(maxAB):
    if (Max - Min) % 2 == 0:
            Max = Max - 1
            Min = Min + 1
    else:
        medAB = (Max + Min) / 2
        if medAB > med:
            Max = Max + 1
            Min = Min + 1

            if Max > N:
                Max = N
            elif Min > N:
                Min = N
        else:
            Max = Max - 1
            Min = Min - 1
        
            if Max < 1:
                Max = 1
            elif Min < 1:
                Min = 1
        

    round_count = round_count + 1

    if Max == Min:
        break

print(round_count)

# Optimized solution
N, A, B = list(map(int, input().split()))

med = N / 2 + 0.5
Sub = B - A

if (Sub) % 2 == 0:
    round_count = Sub // 2
else:
    round_count = min(A - 1, N - B) + 1 + (Sub - 1) // 2
            
print(round_count)
# Original solution
A = list(map(int, input().split()))
A.sort()

if A[0] == A[2]:
    print('No')
elif A[0] == A[1] or A[1] == A[2]:
    print('Yes')
else:
    print('No')

# Optimized solution
A = list(map(int, input().split()))
if len(set(A)) == 2:
    print('Yes')
else:
    print('No')
# Original solution
a = list(map(int, input().split()))
if len(set(a)) == 2:
  print("Yes")
else:
  print("No")


# Optimized solution
A,B,C = list(map(int,input().split()))
if A == B and B == C:
    print("No")
elif A != B and B!= C and A != C:
    print("No")
else:
    print("Yes")
# Original solution
# A - Poor
def main():
    A, B, C = list(map(int, input().split()))
    is_poor = (A == B and A != C) or (A == C and A != B) or (B == C and A != B)
    print(("Yes" if is_poor else "No"))


if __name__ == "__main__":
    main()


# Optimized solution
# A - Poor
def main():
    A, B, C = list(map(int, input().split()))
    is_poor = A == B != C or A == C != B or B == C != A
    print(("Yes" if is_poor else "No"))


if __name__ == "__main__":
    main()
# Original solution
import math

class Input():
	def readInt(self):
		return int(eval(input()))

	def readIntArray(self):
		return [int(x) for x in input().split(" ")]

	def readString(self):
		return eval(input())

	def readStringArray(self):
		return input().split(" ")

	def readFloat(self):
		return float(eval(input()))

	def readFloatArray(self):
		return [float(x) for x in input().split(" ")]

def main():
	inp = Input()
	arr =  inp.readIntArray()
	s = set()
	s.update(arr)
	if len(s) == 2:
		print("Yes")
	else:
		print("No")

if __name__ == "__main__":
   main()

# Optimized solution
A,B,C = input().split()
a = A
b = B
c = C
if (a==b and a==c):
    print("No")
elif (a==b or b==c or a==c):
    print("Yes")
elif (a!=b or b!=c):
    print("No")
# Original solution
li=list(map(int,input().split()))


if len(set(li))==2:
    print("Yes")
    
else:
    print("No")

# Optimized solution
print(("Yes" if 2==len(set(list(map(int,input().split())))) else "No"))
# Original solution
print((['No','Yes'][len(set(map(int,input().split())))==2]))

# Optimized solution
print(('YNeos'[len(set(input().split()))!=2::2]))
# Original solution
a, b, c = list(map(int, input().split()))
if a == c and a != b:
    print('Yes')
elif a == b and a != c:
    print('Yes')
elif b == c and a != b:
    print('Yes')
else:
    print('No')


# Optimized solution
if len(set(input().split()))==2:
  print('Yes')
else:
  print('No')
# Original solution
import sys

*a, = list(map(int, sys.stdin.readline().split()))
a.sort()
a, b, c = a

def main():
    if a == b != c or a != b == c:
        return 'Yes'
    return 'No'

if __name__ == '__main__':
    ans = main()
    print(ans)

# Optimized solution
import sys

*a, = list(map(int, sys.stdin.readline().split()))

def main():
    ans = 'Yes' if len(set(a)) == 2 else 'No'
    print(ans)

if __name__ ==  '__main__':
    main()
# Original solution
A,B,C = list(map(int,input().split()))

if(A==B):
    if(A!=C):
        print('Yes')
    else:
        print('No')
elif(A==C):
    if(A!=B):
        print('Yes')
    else:
        print('No')
elif(B==C):
    if(A!=B):
        print('Yes')
    else:
        print('No')
else:
    print('No')

# Optimized solution

def main():
    A,B,C = list(map(int,input().split()))
    if(A == B and B != C):
        print("Yes")
    elif(B == C and A != B):
        print("Yes")
    elif(A == C and A != B):
        print("Yes")
    else:
        print("No")

if __name__ == "__main__":
    main()
# Original solution
a, b, c = list(map(int, input().split()))
if len(set([a, b, c])) == 2:
    print("Yes")
else:
    print("No")


# Optimized solution
s = list(map(int,input().split()))
if len(set(s)) == 2:
  print("Yes")
else:
  print("No")
# Original solution
a,b,c = list(map(int,input().split()))
if a == b and c != a:
    print("Yes")
elif b == c and c != a:
    print("Yes")
elif c == a and a != b:
    print("Yes")
else:
    print('No')

# Optimized solution
a,b,c = list(map(int,input().split()))
s = set()
s.add(a)
s.add(b)
s.add(c)
if len(s) == 2:
    print('Yes')
else:
    print('No')
# Original solution
A, B, C = list(map(int,input().split()))
if A ==B and B == C:
    print('No')
elif B == C:
    print('Yes')
elif A == C:
    print('Yes')
elif A == B:
    print('Yes')
else:
    print('No')

# Optimized solution
A, B, C = list(map(int,input().split()))
if A == B == C:
    print('No')
elif B == C:
    print('Yes')
elif A == C:
    print('Yes')
elif A == B:
    print('Yes')
else:
    print('No')
# Original solution
n = input().split()
for i in range (3) :
    n[i] = int(n[i])

a = sorted (n)

fl = False

if (a[0] == a[1] and a[1] != a[2]) :
    fl = True
if (a[0] != a[1] and a[1] == a[2]) :
    fl = True
print(('Yes' if fl else 'No'))

# Optimized solution
A,B,C=input().split()
a,b,c=int(A),int(B),int(C)

if a==b and b!=c:
    print("Yes")
elif a==c and a!=b:
    print("Yes")
elif b==c and a!=b:
    print("Yes")
else:
    print("No")
# Original solution
import sys
input = sys.stdin.readline

A = [int(x) for x in input().split()]

from collections import Counter

c = Counter(A)

for i in list(c.values()):
    if i == 2:
        print("Yes")
        sys.exit()
print("No")


# Optimized solution
A = [int(x) for x in input().split()]
from collections import Counter
import sys
c = Counter(A)

for i in list(c.values()):
  if i == 2:
    print("Yes")
    sys.exit()

print("No")
# Original solution
a,b,c=list(map(int,input().split()))
if a==b and a!=c:
  print('Yes')
elif a==c and a!=b:
  print('Yes')
elif b==c and b!=a:
  print('Yes')
else:
  print('No')


# Optimized solution
a,b,c=list(map(int,input().split()))
if a==b:
  if a!=c :
    print('Yes')
  else:
    print('No')
elif a==c:
  if a!=b :
    print('Yes')
  else:
    print('No')   
elif c==b:
  if a!=c :
    print('Yes')
  else:
    print('No')    
else:
  print('No')
# Original solution
import itertools
import math
import fractions
import functools
a, b, c = list(map(int, input().split()))
if (a == b and a != c) or (b == c and b != a) or (a == c and a != b):
    print("Yes")
else: print("No")

# Optimized solution
a, b, c = list(map(int, input().split()))
if (a == b or a == c or b ==c) and not (a == b and a == c):
    print("Yes")
else:print("No")
# Original solution
A = list(map(int,input().split()))
newA = sorted(A)

if newA[0]==newA[1]==newA[2]:
    print("No")
elif newA[0]  == newA[1] or newA[1] == newA[2]:
    print("Yes")
else:
    print("No")

# Optimized solution
A,B,C = list(map(int, input().split()))

if A == B == C:
    print("No")
elif A == B or A == C or B == C:
    print("Yes")
else:
    print("No")
# Original solution
import sys


def solve():
    readline = sys.stdin.buffer.readline
    mod = 10 ** 9 + 7
    a, b, c = list(map(int, readline().split()))
    if a == b != c or a != b == c or a == c != b:
        print("Yes")
    else:
        print("No")


if __name__ == '__main__':
    solve()


# Optimized solution
import sys


def solve():
    readline = sys.stdin.buffer.readline
    mod = 10 ** 9 + 7
    a, b, c = list(map(int, readline().split()))
    if a == b != c or a == c != b or b == c != a:
        print("Yes")
    else:
        print("No")


if __name__ == '__main__':
    solve()
# Original solution
A,B,C = sorted(list(map(int,input().split())))

if A==B and B==C:
  print("No")
elif A==B or B==C:
  print("Yes")
else:
  print("No")

# Optimized solution
if len(set(map(int,input().split())))==2:
  print("Yes")
else:
  print("No")
# Original solution
def main():
    a, b, c = list(map(int, input().split()))
    if (a == b and c != a) or (a == c and b != c) or (b == c and a != b):
        print("Yes")
    else:
        print("No")

if __name__ == '__main__':
    main()

# Optimized solution
n = list(map(int,input().split()))
n.sort()
a,b,c = n
flag = False
if a == b and c != a:
    flag = True
elif a == c and b != c:
    flag = True
elif b == c and a != b:
    flag = True
print(("Yes" if flag else "No"))
# Original solution
import collections
A = list(map(int, input().split()))
if len(collections.Counter(A)) == 2:
  print('Yes')
else: print('No')

# Optimized solution
A = list(map(int, input().split()))
if len(set(A)) == 2:
  print('Yes')
else: print('No')
# Original solution
a, b, c = list(map(int, input().split()))

if a == b and b != c:
    print("Yes")
elif a == b and b == c:
    print("No")
elif a != b and b == c:
    print("Yes")
elif a != b and a == c:
    print("Yes")
else:
    print("No")

# Optimized solution
a = list(map(int, input().split()))
a = set(a)
if len(a) == 2:
    print("Yes")
else:
    print("No")
# Original solution
L = list(map(int,input().split(" ")))

if len(set(L)) == 2:
    print("Yes")
else:
    print("No")

# Optimized solution
ans = "Yes" if len(set(input().split())) == 2 else "No"
print(ans)
# Original solution
a, b, c = list(map(int, input().split()))

if a == b != c or b == c != a or c == a != b:
	print("Yes")
else:
	print("No")

# Optimized solution
st = set(map(int, input().split()))

print(('Yes' if len(st) == 2 else 'No'))
# Original solution
print(*[i[0] for i in input().split()],sep='')


# Optimized solution
print(f'A{input()[8]}C')
# Original solution
s = input()[8]
print(("A"+s+"C"))

# Optimized solution
s = input()[8]
print(("A%sC" % s))
# Original solution
lst=input().split()
x=lst[1]
print(('A'+x[0]+'C'))

# Optimized solution
a,b,c=list(map(str,input().split()))
print(('A'+b[0]+'C'))
# Original solution
import re

A, B, C = list(map(str, input().split()))

def search_func(string_list):
    return re.match('[A-Z]', string_list).group()

second_string = search_func(B)

print(('A' + second_string + 'C'))


# Optimized solution
s,t,u=input().split()
print(('A'+t[0]+'C'))
# Original solution
abc=list(input().split())
print(('A'+abc[1][0]+'C'))


# Optimized solution
A, B, C = input().split()
print(('A' + B[0] + 'C'))
# Original solution
n = input().split()[1]
print(('A%sC'%n[0]))

# Optimized solution
a = input().split()
print((a[0][0] + a[1][0] + a[2][0]))
# Original solution
a,b,c= input().split()
print((a[0]+b[0]+c[0]))

# Optimized solution
print(("A%sC"%input()[8]))
# Original solution
print(("A%sC"%input()[8]))

# Optimized solution
print(("A"+input()[8]+"C"))
# Original solution
a=input().split()
print(("A"+a[1][0]+"C"))


# Optimized solution
print(("A"+input()[8]+"C"))
# Original solution
a,s,c = input().split(" ")
print(("A{}C".format(s[0])))

# Optimized solution
a,s,c = input().split()

print(("A"+s[0]+"C"))
# Original solution
s = list(input().split())
print(s[0][0],s[1][0],s[2][0], sep="")


# Optimized solution
import sys

a, b, c = sys.stdin.readline().split()
print((a[0] + b[0] + c[0]))
# Original solution
S = input().split()
print(("A"+S[1][0]+"C"))


# Optimized solution
a, b, c = input().split()
print((a[0]+b[0]+c[0]))
# Original solution
_,s,_ = input().split()
print(("A"+s[0]+"C"))


# Optimized solution
S = input().split()
print(("A"+S[1][0]+"C"))
# Original solution
a, b, c = list(map(str, input().split()))
print((a[0] + b[0] + c[0]))


# Optimized solution
a, b, c = list(map(str, input().split()))
print((a[0].upper() + b[0].upper() + c[0].upper()))
# Original solution
a = input().split()
x = a[1]
print(('A' + x[0] + 'C'))

# Optimized solution
print(('A'+input()[8]+'C'))
# Original solution
print(('A' + input().split()[1][0] + 'C'))


# Optimized solution
a = input().split()
print(*[h[0] for h in a], sep='')
# Original solution
a,b,c=list(map(str,input().split()))
c=b[0]
print(('A'+c+'C'))


# Optimized solution
xs = input().split()
 
print(("A"+xs[1][0]+"C"))
# Original solution
a, b, c = input().split()
print((a[0] + b[0] + c[0]))

# Optimized solution
A, B, C = input().split()
print(('A'+B[0]+'C'))
# Original solution
s1, s2, s3 = input().split()
print(("{0}{1}{2}".format(s1[0], s2[0], s3[0])))

# Optimized solution
print(("A"+input()[8]+"C"))
# Original solution
s = input().split()
print(('{}{}{}'.format(s[0][0], s[1][0], s[2][0])))

# Optimized solution
a, b, c = input().split(' ')
print((a[0] + b[0] + c[0]))
# Original solution
s=tuple(input().split())
print(("A{}C".format(s[1][0])))

# Optimized solution
s = input().split()
ans = s[0][0] + s[1][0] + s[2][0]
print(ans)
# Original solution
a,b,c = list(map(int,input().split()))

sound_max = b//a

if c >= sound_max:
    print(sound_max)

elif c <= sound_max:
    print(c)




# Optimized solution
a,b,c = list(map(int,input().split()))
if b//a >= c:
    print(c)
else:
    print((b//a))
# Original solution
A, B, C = list(map(int, input().split()))
print((min(C, B//A)))

# Optimized solution
a,b,c=list(map(int,input().split()))
print((min(c,b//a)))
# Original solution
a, b, c = list(map(int, input().split()))
if a*c <= b:
	print (c)
else:
	print((b//a))

# Optimized solution
a, b, c = list(map(int, input().split()))
if a*c < b:
	print (c)
else:
	print((b//a))
# Original solution
a, b, c = list(map(int, input().split()))
print((c if b//a >= c else b//a)) 

# Optimized solution
a, b, c = list(map(int, input().split()))
print((b // a if b//a <= c else c))
# Original solution
A, B, C = list(map(int, input().split()))
if A * C > B:
    print((B // A))
else:
    print(C)

# Optimized solution
A, B, C = list(map(int, input().split()))
if A * C >= B:
    print((B // A))
else:
    print(C)
# Original solution
A, B, C = list(map(int, input().split()))
print((min(B//A, C)))

# Optimized solution
A, B, C = list(map(int, input().split()))

print((min(C, B // A)))
# Original solution
a,b,c=list(map(int,input().split()))
print((min(b//a,c)))

# Optimized solution
a,b,c = list(map(int,input().split()))
print((min(c,b//a)))
# Original solution
A, B, C = list(map(int, input().split()))
print((C if B // A > C else B // A))

# Optimized solution
A, B, C = list(map(int, input().split()))
print((min(C, B // A)))
# Original solution
a,b,c=list(map(int,input().split()))
if b//a > c:
  print(c)
else:
  print((b//a))

# Optimized solution
A,B,C=list(map(int, input().split()))
print((B//A if B<A*C else C))
# Original solution
a,b,c=list(map(int,input().split()))
print((min(c,b//a)))

# Optimized solution
A,B,C = list(map(int,input().split()))
print((min(C,B//A)))
# Original solution
import sys
from bisect import *
from heapq import *
from collections import *
from itertools import *
from functools import *
from math import *
from fractions import *

sys.setrecursionlimit(100000000)
input = lambda: sys.stdin.readline().rstrip()

A, B, C = list(map(int, input().split()))
print((min(C, B // A)))


# Optimized solution
A, B, C = list(map(int, input().split()))
print((min(C, B // A)))
# Original solution
a,b,c = list(map(int,input().split()))
print((min(b//a,c)))

# Optimized solution
a,b,c = list(map(int,input().split()))
print((min(c,b//a)))
# Original solution
A, B, C = list(map(int, input().split()))
retval = B // A
print((min(retval, C)))

# Optimized solution
A, B, C = list(map(int, input().split()))

print((min(C, B // A)))
# Original solution
import math

def main():
    a, b, c = [int(x) for x in input().split()]

    max_listen = math.floor(b/a)

    print((min(c, max_listen)))

    pass


if __name__ == "__main__":
    main()

# Optimized solution
a, b, c = [int(x) for x in input().split()]
print((min(b//a, c)))
# Original solution
n, m, l = list(map(int, input().split()))

A = []
B = []
C = [[] for i in range(n)]

for i in range(n):
    tmp_row = list(map(int, input().split()))
    A.append(tmp_row)

for i in range(m):
    tmp_row = list(map(int, input().split()))
    B.append(tmp_row)

for i in range(n):
    line = ""
    for j in range(l):
        ab = sum([A[i][k] * B[k][j] for k in range(m)])
        line += " {0}".format(ab)
    print((line[1:]))

# Optimized solution
n, m, l = list(map(int, input().split()))

A = []
B = []
C = [[] for i in range(n)]

for i in range(n):
    tmp_row = list(map(int, input().split()))
    A.append(tmp_row)

for i in range(m):
    tmp_row = list(map(int, input().split()))
    B.append(tmp_row)

for i in range(n):
    for j in range(l):
        ab = sum([A[i][k] * B[k][j] for k in range(m)])
        C[i].append(ab)

for i in C:
    print((" ".join(map(str, i))))
# Original solution
[n, m, l] = [int(x) for x in input().split()]

A = []
B = []
C = []
counter = 0
while counter < n:
    A.append([int(x) for x in input().split()])
    counter += 1

counter = 0
while counter < m:
    B.append([int(x) for x in input().split()])
    counter += 1

counter = 0
while counter < n:
    C.append([0] * l)
    counter += 1

for i in range(n):
    for j in range(l):
        for k in range(m):
            C[i][j] += (A[i][k] * B[k][j])

for data in C:
    print((' '.join([str(x) for x in data])))

# Optimized solution
[n, m, l] = [int(x) for x in input().split()]

A = []
B = []
counter = 0
while counter < n:
    A.append([int(x) for x in input().split()])
    counter += 1

counter = 0
while counter < m:
    B.append([int(x) for x in input().split()])
    counter += 1

B = list(zip(*B))

for i in range(n):
    data = []
    for j in range(l):
        data.append(sum([x[0] * x[1] for x in zip(A[i], B[j])]))
    print((' '.join([str(x) for x in data])))
# Original solution
(n, m, l) = [int(i) for i in input().split()]

A = []
for nc in range(n):
    A.append([int(i) for i in input().split()])

B = []
for mc in range(m):
    B.append([int(i) for i in input().split()])

product = [[0 for d in range(l)] for dd in range(n)]

for nc in range(n):
    for lc in range(l):
        for mc in range(m):
            product[nc][lc] += A[nc][mc] * B[mc][lc]

for r in product:
    print((' '.join([str(d) for d in r])))

# Optimized solution
(n, m, l) = [int(i) for i in input().split()]

A = []
B = []
for _ in range(n):
    A.append([int(i) for i in input().split()])
for _ in range(m):
    B.append([int(i) for i in input().split()])

for i in range(n):
    C = [0 for _ in range(l)]
    for j in range(l):
        for k in range(m):
            C[j] += A[i][k] * B[k][j]
    print((" ".join([str(a) for a in C])))
# Original solution
n,m,l=map(int,input().split())
a=[list(map(int,input().split()))for _ in range(n)]
b=[list(map(int,input().split()))for _ in range(m)]
[print(*x)for x in[[sum(s*t for s,t in zip(c,l))for l in zip(*b)]for c in a]]


# Optimized solution
n,m,l=map(int,input().split())
a=[list(map(int,input().split()))for _ in range(n)]
b=[list(map(int,input().split()))for _ in range(m)]
[print(*x)for x in[[sum([s*t for s,t in zip(c,l)])for l in zip(*b)]for c in a]]
# Original solution
import sys
e=[list(map(int,e.split()))for e in sys.stdin]
n=e[0][0]+1
for c in e[1:n]:
 t=''
 for l in zip(*e[n:]):t+=f'{sum(s*t for s,t in zip(c,l))} '
 print((t[:-1]))


# Optimized solution
import sys
e=[list(map(int,e.split()))for e in sys.stdin]
n=e[0][0]+1
t=''
for c in e[1:n]:
 for l in zip(*e[n:]):t+=f'{sum(s*t for s,t in zip(c,l))} '
 t=t[:-1]+'\n'
print((t[:-1]))
# Original solution
import sys
e=[list(map(int,e.split()))for e in sys.stdin]
n=e[0][0]+1
t=''
for c in e[1:n]:
 for l in zip(*e[n:]):t+=f'{sum(s*t for s,t in zip(c,l))} '
 t=t[:-1]+'\n'
print((t[:-1]))


# Optimized solution
import sys
e=[list(map(int,e.split()))for e in sys.stdin]
n=e[0][0]+1
[print(*[sum(s*t for s,t in zip(c,l))for l in zip(*e[n:])])for c in e[1:n]]
# Original solution
import sys
e=[list(map(int,e.split()))for e in sys.stdin]
n=e[0][0]+1
[print(*[sum(s*t for s,t in zip(c,l))for l in zip(*e[n:])])for c in e[1:n]]


# Optimized solution
import sys
e=[list(map(int,x.split()))for x in sys.stdin];n=e[0][0]+1
[print(*x)for x in[[sum(s*t for s,t in zip(c,l))for l in zip(*e[n:])]for c in e[1:n]]]