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() for j in range(m): v = [Fraction(0, 1)] * m v[j] += 1 for bi in b: for j0 in range(m): if bi[j0]: c = v[j] / bi[j0] for j1 in range(j0, m): v[j1] -= c * bi[j1] break if any(v): u = [Fraction(0, 1)] * l for j in range(m): for k in range(l): u[k] += v[j] * a[j][k] if not any(u): print('No') exit() print('Yes')