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) def get_base(b): b = [bi[:] for bi in b] if not b: return b n = len(b) m = len(b[0]) 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] return b b = get_base(b) 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() ok = m == len(b) + len(get_base(a)) print('Yes' if ok else 'No')