from fractions import Fraction def rank(c): d = [] for i in c: b = False if any(i): d.append(i) h = len(d) if h == 0: return 0 w = len(d[0]) for i in range(h): k = 0 while k < w and d[i][k] == 0: k += 1 if k == w: return i # d[i][k]はd[i]の中で一番要素が小さい0でない要素なのでこれをベースにする bs = d[i][k] for j in range(w): d[i][j] /= bs for j in range(i + 1, h): bs2 = d[j][k] if bs2 != 0: for l in range(k, w): d[j][l] -= d[i][l] * bs2 return h l, m, n = map(int, input().split()) a = [list(map(lambda x: Fraction(int(x), 1), input().split())) for _ in range(l)] b = [list(map(lambda x: Fraction(int(x), 1), input().split())) for _ in range(m)] # AB=Oか? for i in range(l): for j in range(n): if sum(a[i][k] * b[k][j] for k in range(m)) != 0: exit(print("No")) # m-rank(a) = rank(b)ならOK print("Yes" if rank(a) + rank(b) == m else "No")