#include<deque>
#include<queue>
#include<vector>
#include<algorithm>
#include<iostream>
#include<set>
#include<cmath>
#include<tuple>
#include<string>
#include<chrono>
#include<functional>
#include<iterator>
#include<random>
#include<unordered_set>
#include<array>
#include<map>
#include<iomanip>
#include<assert.h>
#include<list>
#include<bitset>
#include<stack>
#include<memory>
#include<numeric>
using namespace std;
using namespace std::chrono;
typedef long long int llint;
typedef long double lldo;
#define mp make_pair
#define mt make_tuple
#define pub push_back
#define puf push_front
#define pob pop_back
#define pof pop_front
#define fir first
#define sec second
#define res resize
#define ins insert
#define era erase
/*cout<<fixed<<setprecision(20);cin.tie(0);ios::sync_with_stdio(false);*/
const llint mod=1000000007;
const llint big=2.19e15+1;
const long double pai=3.141592653589793238462643383279502884197;
const long double eps=1e-12;
template <class T,class U>bool mineq(T& a,U b){if(a>b){a=b;return true;}return false;}
template <class T,class U>bool maxeq(T& a,U b){if(a<b){a=b;return true;}return false;}
llint gcd(llint a,llint b){if(a%b==0){return b;}else return gcd(b,a%b);}
llint lcm(llint a,llint b){if(a==0){return b;}return a/gcd(a,b)*b;}
template<class T> void SO(T& ve){sort(ve.begin(),ve.end());}
template<class T> void REV(T& ve){reverse(ve.begin(),ve.end());}
template<class T>llint LBI(const vector<T>&ar,T in){return lower_bound(ar.begin(),ar.end(),in)-ar.begin();}
template<class T>llint UBI(const vector<T>&ar,T in){return upper_bound(ar.begin(),ar.end(),in)-ar.begin();}
bool solve(void){
	int h,w,r,c,i,j,x,y;cin>>h>>w>>r>>c;
	if(h==0){return false;}
	static char ma[1003][1003];
	int hs=h*2+2,ws=w*2+2;
	for(x=0;x<=ws;x+=2){ma[0][x]=7;ma[hs][x]=7;}//脱出可能
	for(y=0;y<=ws;y+=2){ma[y][0]=7;ma[y][ws]=7;}//脱出可能
	for(y=2;y<hs;y+=2){for(x=2;x<ws;x+=2){ma[y][x]=0;}}
	for(y=1;y<hs;y++){
		for(x=y%2+1;x<ws;x+=2){cin>>ma[y][x];ma[y][x]-='0';}
	}
	for(x=2;x<ws;x+=2){
		if(ma[1][x]){ma[2][x]|=2;}else{ma[2][x]|=1;}
		if(ma[hs-1][x]){ma[hs-2][x]|=2;}else{ma[hs-2][x]|=1;}
	}
	for(y=2;y<hs;y+=2){
		if(ma[y][1]){ma[y][2]|=2;}else{ma[y][2]|=1;}
		if(ma[y][ws-1]){ma[y][ws-2]|=2;}else{ma[y][ws-2]|=1;}
	}
	queue<pair<int,int>>que;
	for(y=2;y<hs;y+=2){
		for(x=2;x<ws;x+=2){
			if(ma[y][x]==3){ma[y][x]=7;que.push(mp(y,x));}
		}
	}
	while(que.size()){
		tie(y,x)=que.front();que.pop();
		//cerr<<y<<" "<<x<<endl;
		if(ma[y-1][x]){ma[y-2][x]|=2;}else{ma[y-2][x]|=1;}
		if(ma[y-2][x]==3){ma[y-2][x]=7;que.push(mp(y-2,x));}
		if(ma[y+1][x]){ma[y+2][x]|=2;}else{ma[y+2][x]|=1;}
		if(ma[y+2][x]==3){ma[y+2][x]=7;que.push(mp(y+2,x));}
		if(ma[y][x-1]){ma[y][x-2]|=2;}else{ma[y][x-2]|=1;}
		if(ma[y][x-2]==3){ma[y][x-2]=7;que.push(mp(y,x-2));}
		if(ma[y][x+1]){ma[y][x+2]|=2;}else{ma[y][x+2]|=1;}
		if(ma[y][x+2]==3){ma[y][x+2]=7;que.push(mp(y,x+2));}
	}
	y=r*2;x=c*2;
	if(ma[y-1][x]==0&&ma[y-2][x]==7){cout<<"Yes"<<endl;return true;}
	if(ma[y+1][x]==0&&ma[y+2][x]==7){cout<<"Yes"<<endl;return true;}
	if(ma[y][x-1]==0&&ma[y][x-2]==7){cout<<"Yes"<<endl;return true;}
	if(ma[y][x+1]==0&&ma[y][x+2]==7){cout<<"Yes"<<endl;return true;}
	cout<<"No"<<endl;return true;
}
int main(void){
	cout<<fixed<<setprecision(20);cin.tie(0);ios::sync_with_stdio(false);
	while(solve()){}
	return 0;
}



Measured memory_bytes: 4080