h,w=map(int,input().split()) a=[tuple(map(int,input().split())) for _ in range(h)] dp=[[[-10**18]*2 for _ in range(w)] for _ in range(h)] dp[0][0][0]=a[0][0] for i in range(h): for j in range(w): if i-1>=0: if dp[i-1][j][0]>a[i][j]: dp[i][j][0]=max(dp[i][j][0],dp[i-1][j][0]+a[i][j]) else: dp[i][j][1]=max(dp[i][j][1],dp[i-1][j][0]) if dp[i-1][j][1]>a[i][j]: dp[i][j][1]=max(dp[i][j][1],dp[i-1][j][1]+a[i][j]) if j-1>=0: if dp[i][j-1][0]>a[i][j]: dp[i][j][0]=max(dp[i][j][0],dp[i][j-1][0]+a[i][j]) else: dp[i][j][1]=max(dp[i][j][1],dp[i][j-1][0]) if dp[i][j-1][1]>a[i][j]: dp[i][j][1]=max(dp[i][j][1],dp[i][j-1][1]+a[i][j]) if dp[-1][-1][1]>a[-1][-1] or dp[-1][-1][0]>0: print('Yes') else: print('No')