#include<iostream>
using namespace std;
#define MAX 200000
int main(){
  string str;
  int N,A,B,C,D;
  cin >> N >> A >> B >> C >> D;
  cin >> str;
  //str[A-1] = 'A';
  //str[B-1] = 'D';
  while(1){
    if(A == C && B == D){
      cout << "Yes";
      break;
    }
    if(A < C && str[A] == '.' && A+1 != B){
      A++;
    }else if(A+1 < C && str[A+1] == '.' && A+2 != B){
      A += 2;
    }else if(B < D && str[B] == '.' && B+1 !=  A){
      B++;
    }else if(B+1 < D && str[B+1] == '.'  &&  B+2 != A){
      B +=  2;
    }else{
      cout << "No";
      break;
    }
  }
}
                  
  
