import java.io.*; import java.util.*; public class Main { public static void main(String[] args) throws Exception { Scanner sc = new Scanner(); int h = sc.nextInt(); int w = sc.nextInt(); int[][] field = new int[h][w]; for (int i = 0; i < h; i++) { for (int j = 0; j < w; j++) { field[i][j] = sc.nextInt(); } } PriorityQueue queue = new PriorityQueue<>(); queue.add(new Path(1, 0, 0, field[0][0])); queue.add(new Path(0, 1, 0, field[0][0])); long[][][] gains = new long[2][h][w]; while (queue.size() > 0) { Path p = queue.poll(); if (p.value <= field[p.r][p.c]) { if (p.count == 1) { continue; } if (p.r < h - 1) { queue.add(new Path(p.r + 1, p.c, 1, p.value)); } if (p.c < w - 1) { queue.add(new Path(p.r, p.c + 1, 1, p.value)); } } else { p.value += field[p.r][p.c]; if (gains[p.count][p.r][p.c] >= p.value) { continue; } gains[p.count][p.r][p.c] = p.value; if (p.r < h - 1) { queue.add(new Path(p.r + 1, p.c, p.count, p.value)); } if (p.c < w - 1) { queue.add(new Path(p.r, p.c + 1, p.count, p.value)); } } } if (gains[0][h - 1][w - 1] > 0 || gains[1][h - 1][w - 1] > 0) { System.out.println("Yes"); } else { System.out.println("No"); } } static class Path implements Comparable { int r; int c; int count; long value; public Path(int r, int c, int count, long value) { this.r = r; this.c = c; this.count = count; this.value = value; } public int compareTo(Path another) { if (value == another.value) { return 0; } else if (value < another.value) { return 1; } else { return -1; } } } } class BinaryIndexedTree { int size; int[] tree; public BinaryIndexedTree(int size) { this.size = size; tree = new int[size]; } public void clear() { Arrays.fill(tree, 0); } public void add(int idx, int value) { int mask = 1; while (idx < size) { if ((idx & mask) != 0) { tree[idx] += value; idx += mask; } mask <<= 1; } } public int getSum(int from, int to) { return getSum(to) - getSum(from - 1); } public int getSum(int x) { int mask = 1; int ans = 0; while (x > 0) { if ((x & mask) != 0) { ans += tree[x]; x -= mask; } mask <<= 1; } return ans; } } class Scanner { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); StringTokenizer st = new StringTokenizer(""); public Scanner() throws Exception { } public int nextInt() throws Exception { return Integer.parseInt(next()); } public long nextLong() throws Exception { return Long.parseLong(next()); } public double nextDouble() throws Exception { return Double.parseDouble(next()); } public String next() throws Exception { if (!st.hasMoreTokens()) { st = new StringTokenizer(br.readLine()); } return st.nextToken(); } }