function Main(input) {
	lines = input.split("\n");
	N = parseInt(lines[0].split(' ')[0], 10);
	A = parseInt(lines[0].split(' ')[1], 10);
	B = parseInt(lines[0].split(' ')[2], 10);
	C = parseInt(lines[0].split(' ')[3], 10);
	D = parseInt(lines[0].split(' ')[4], 10);
	S = lines[1];
	S = '#' + S + '#';
	can_reach = (start, end) => {
	  for(var i=start; i+1<= end; i++) {
	    if(S[i] == '#' && S[i+1] == '#') return false;
	  }
	  return true;
	};
	if(!can_reach(A, C) || !can_reach(B, D)) {
	  console.log('No');
	  return;
	}
	
	if(C > D){
	  snuke_can_over = false;
	  for(var i=B; i <= D; i++) {
	    if(S[i-1]=='.' && S[i]=='.' && S[i+1]=='.'){
	      snuke_can_over = true;
	    }
	  }
	  if(!snuke_can_over) {
	    console.log('No');
	    return;
	  }
	}
	console.log('Yes');
	return
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
