#include <bits/stdc++.h>
#include <cstring>
using namespace std;
int main(void){
  int n,a,b,c,d,i;
  string s;
  cin >> n >> a >> b >> c >> d;
  cin >> s;
  for (i=a-1;i<c-1||i<d-1;i++) if (s.at(i)=='#'&&s.at(i+1)=='#'){
    cout << "No" << endl;
    return 0;
  }
  if (c<d){
    cout << "Yes" << endl;
    return 0;
  }
  bool ans=false;
  for (i=b-2;i<=d-2;i++) if (s.at(i)=='.'&&s.at(i+1)=='.'&&s.at(i+2)=='.'){
    ans=true;
    break;
  }
  if (ans) cout << "Yes" << endl;
  else cout << "No" << endl;
  return 0;
}