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