H,W=map(int,input().split()) A=["*"] for _ in range(H): A.append(["*"]+list(map(int,input().split()))) inf=float("inf"); huge=2*10**9 DP=[[[-inf,-inf] for _ in range(W+1)] for _ in range(H+1)] for i in range(1,H+1): for j in range(1,W+1): if i==j==1: DP[i][j]=[A[1][1],-inf] continue if max(DP[i-1][j][0],DP[i][j-1][0])>A[i][j]: DP[i][j][0]=max(DP[i-1][j][0],DP[i][j-1][0])+A[i][j] else: DP[i][j][1]=max(DP[i-1][j][0],DP[i][j-1][0]) if max(DP[i-1][j][1],DP[i][j-1][1])>A[i][j]: DP[i][j][1]=max(DP[i][j][1], max(DP[i-1][j][1],DP[i][j-1][1])+A[i][j]) if DP[i][j][0]>huge: DP[i][j][0]=inf if DP[i][j][1]>huge: DP[i][j][1]=inf if max(DP[H-1][W][0], DP[H-1][W][1], DP[H][W-1][0], DP[H][W-1][1])>A[H][W]: print("Yes") else: print("No")