import sys from fractions import Fraction # print(sys.stdin.buffer.read()) inp = map(int, sys.stdin.buffer.read().split()) # l, m, n = map(int, input().split()) l = next(inp) m = next(inp) n = next(inp) # N->M->L # A: M->L ... M * L # B: N->M ... N * M a = [[0] * l for _ in range(m)] b = [[0] * m for _ in range(n)] for j in range(l): for i in range(m): a[i][j] = Fraction(next(inp), 1) for j in range(m): for i in range(n): b[i][j] = Fraction(next(inp), 1) i = 0 for j in range(m): for i0 in range(i, n): if b[i0][j]: break else: continue b[i], b[i0] = b[i0], b[i] c = 1 / b[i][j] for j0 in range(j, m): b[i][j0] *= c for i0 in range(i + 1, n): c = b[i0][j] for j0 in range(j, m): b[i0][j0] -= b[i][j0] * c i += 1 b = b[:i] for u in b: if any(sum(u[i] * a[i][j] for i in range(m)) for j in range(l)): print('No') exit() todo = [True] * m for u in b: for i in range(m): if u[i]: todo[i] = False break for i in range(m): if not todo[i]: continue if not any(a[i]): print('No') exit() print('Yes')