h,w = map(int,input().split()) G = [list(map(int,input().split()))+[0] for _ in range(h)] G.append([0]*(w+1)) dpA = [[0]*(w+1) for _ in range(h+1)] dpB = [[0]*(w+1) for _ in range(h+1)] dpA[0][0]=G[0][0] dpB[0][0]=G[0][0] for i in range(h): for j in range(w): if(G[i+1][j]G[-2][-2] or dpB[-2][-2]>G[-2][-2]): print("Yes") else: print("No")