import std.stdio;
import std.algorithm;
import std.string;
import std.container;
import std.typecons;

void log(A...)(A arg) {
    stderr.writeln(arg);
}

void main() {
    while (true) {
        int H, W, R, C;
        readf("%d %d %d %d\n", &H, &W, &R, &C);
        if (H == 0 && W == 0 && R == 0 && C == 0) break;
        R--; C--;
        auto F = new string[H * 2 + 1];
        foreach (ref L; F) {
            L = readln.chomp;
            if (L.length == W * 2) L ~= " ";
        }

        auto state = new int[][][](H, W, 2);
        foreach (ref a; state) foreach (ref b; a) b[] = -1;
        
        alias P = Tuple!(int, "y", int, "x");

        const dy = [0, 1, 0, -1];
        const dx = [1, 0, -1, 0];
        DList!P Q;
        auto inQ = new bool[][](H, W);
        foreach (y; 0 .. H) foreach (x; 0 .. W) {
            if (y == 0 || y == H - 1 || x == 0 || x == W - 1) {
                if (inQ[y][x]) continue;
                Q.insert(P(y, x));
                inQ[y][x] = true;
            }
        }
        while (!Q.empty) {
            P c = Q.front; Q.removeFront;
            inQ[c.y][c.x] = false;
            foreach (k; 0 .. 4) {
                int ny = c.y + dy[k];
                int nx = c.x + dx[k];
                int by = c.y * 2 + 1 + dy[k];
                int bx = c.x * 2 + 1 + dx[k];
                foreach (i; 0 .. 2) {
                    if (state[c.y][c.x][i] == 1) continue;
                    if ( (F[by][bx] == '0' && i == 0) || (F[by][bx] == '1' && i == 1) ) {
                        if ( (ny < 0 || ny >= H || nx < 0 || nx >= W) || (state[ny][nx][0] == 1 && state[ny][nx][1] == 1) ) {
                            state[c.y][c.x][i] = 1;
                            foreach (l; 0 .. 4) {
                                int nny = c.y + dy[l];
                                int nnx = c.x + dx[l];
                                if (nny < 0 || nny >= H || nnx < 0 || nnx >= W) continue;
                                if (inQ[nny][nnx]) continue;
                                Q.insert(P(nny, nnx));
                                inQ[nny][nnx] = true;
                            }
                        }
                    }
                }
            }
        }
        writeln(state[R][C][0] == 1 ? "Yes" : "No");

    }
}