#include<bits/stdc++.h>
using namespace std;
using ll=long long;

int main(){
  int i,j,cnt=0;
  int n,a,b,c,d;
  string s;
  cin>>n>>a>>b>>c>>d;
  cin>>s;
  s='X'+s+'X';
  for(i=b;i<d;i++){
    if(s[i-1]=='#' && s[i]=='#'){
      cout<<"No";
      return 0;
    }
    if(s[i-1]=='.' && s[i]=='.' && s[i+1]=='.')cnt++;
  }
  if(d<c && (s[d-1]=='#' || s[d+1]=='#') && cnt==0){
    cout<<"No";
    return 0;
  }
  for(i=a+1;i<c;i++){
    if(s[i-1]=='#' && s[i]=='#'){
      cout<<"No";
      return 0;
    }
  }
  cout<<"Yes";
}