#include int h, w, y, x; long long int a[502][502]; int heap[1000006], l; int comp_h(int A, int B) { if (a[heap[A] / w][heap[A] % w] > a[heap[B] / w][heap[B] % w]) return 1; else return -1; } void swap_h(int A, int B) { int f = heap[A]; heap[A] = heap[B]; heap[B] = f; return; } void push(int ne) { heap[l] = ne; int p = l; l++; for (; p > 0; p = (p - 1) / 2) if (comp_h((p - 1) / 2, p) > 0) swap_h((p - 1) / 2, p); return; } int pop() { l--; swap_h(0, l); int p = 0; for (;;) { if (2 * p + 2 < l) { if (comp_h(2 * p + 1, 2 * p + 2) > 0) { if (comp_h(p, 2 * p + 2) > 0) swap_h(p, 2 * p + 2); p = 2 * p + 2; } else { if (comp_h(p, 2 * p + 1) > 0) swap_h(p, 2 * p + 1); p = 2 * p + 1; } } else if (2 * p + 1 < l) { if (comp_h(p, 2 * p + 1) > 0) swap_h(p, 2 * p + 1); p = 2 * p + 1; } else break; } return heap[l]; } int used[502][502]; int main() { scanf("%d %d %d %d", &h, &w, &y, &x); int i, j, k; for (i = 0; i < h; i++) for (j = 0; j < w; j++) scanf("%lld", &a[i][j]); long long int v = a[y - 1][x - 1]; a[y - 1][x - 1] = 0; for (i = 0; i < h; i++) for (j = 0; j < w; j++) used[i][j] = 0; int di[4] = { -1,0,1,0 }; int dj[4] = { 0,-1,0,1 }; int ii, jj; l = 0; push(w * (y - 1) + x - 1); while (l > 0) { i = pop(); j = i % w; i /= w; if (used[i][j] > 0) continue; if (a[i][j] >= v) break; v += a[i][j]; used[i][j]++; for (k = 0; k < 4; k++) { ii = i + di[k]; jj = j + dj[k]; if (ii < 0 || jj < 0 || ii >= h || jj >= w) continue; if (used[ii][jj] > 0) continue; push(w * ii + jj); } } k = 0; for (i = 0; i < h; i++) for (j = 0; j < w; j++) if (used[i][j] == 0) k++; if (k > 0) printf("No\n"); else printf("Yes\n"); return 0; }