#include #define rep(i, n) for (int i = 0; i < n; ++i) typedef long long ll; using namespace std; const int dx[] = {-1, 0, 1, 0}; const int dy[] = {0, -1, 0, 1}; int main() { cin.tie(0); ios_base::sync_with_stdio(false); int H, W, sy, sx; cin >> H >> W >> sy >> sx; vector A(H, vector(W)); rep(i, H) rep(j, W) cin >> A[i][j]; sy--, sx--; vector seen(H, vector(W)); seen[sy][sx] = true; vector knock(H, vector(W)); using T = tuple; priority_queue, greater> pq; pq.push({A[sy][sx], sy, sx}); ll cur = 0; while (!pq.empty()) { auto [enemy, y, x] = pq.top(); pq.pop(); if (!(y == sy && x == sx) && enemy > cur) break; knock[y][x] = true; cur += enemy; rep(i, 4) { int ny = y + dy[i], nx = x + dx[i]; if (ny < 0 || ny >= H || nx < 0 || nx >= W) continue; if (seen[ny][nx]) continue; seen[ny][nx] = true; pq.push({A[ny][nx], ny, nx}); } } rep(i, H) rep(j, W) { if (!knock[i][j]) { cout << "No\n"; return 0; } } cout << "Yes\n"; return 0; }