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].split('');
	flag = false;
	if(C > D) {
	  flag=true;
	  for(i=B; i<D; i++) {
	    if(S[i]+S[i+1]+S[i+2] === '...') flag=false;
	  }
	}else {
	  while(A !== C || B !== D) {
  	  if(S[A] !== '#' && A+1 !== B && A+1 <= C && A+1 <= N) { A++; }
  	  else if(S[A+1] !== '#' && A+2 !== B && A+2 <= C && A+2 <= N) { A+=2; }
  	  else if(S[B]   !== '#' && B+1 !== A && B+1 <= D && B+1 <= N){ B++; }
  	  else if(S[B+1] !== '#' && B+2 !== A && B+2 <= D && B+2 <= N){ B+=2; }
  	  else { flag=true; break; }
  	}  
	}
	
	flag ? console.log('No') : console.log('YES');
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
