import sys import numpy as np def main(): h, w = map(int, input().split()) A = np.fromstring(sys.stdin.read(), np.int64, sep=' ').reshape(-1, w) B = np.zeros_like(A, np.int64) C = np.zeros_like(A, np.int64) B[0, 0] = A[0, 0] for i in range(h): for j in range(w): if i == h - 1 and j == w - 1: continue a = A[i, j] if i: b = B[i - 1, j] c = C[i - 1, j] if b > a: B[i, j] = max(B[i, j], b + a) if c > a: C[i, j] = max(C[i, j], c + a) C[i, j] = max(C[i, j], b) if j: b = B[i, j - 1] c = C[i, j - 1] if b > a: B[i, j] = max(B[i, j], b + a) if c > a: C[i, j] = max(C[i, j], c + a) C[i, j] = max(C[i, j], b) print('Yes' if max(B[-2, -1], B[-1, -2], C[-2, -1], C[-1, -2]) > A[-1, -1] else 'No') if __name__ == '__main__': main()