#include <iostream>
using namespace std;
int main(void){
    long long N,A,B,C,D,a,b,i;
    string S;
    cin>>N>>A>>B>>C>>D>>S;
    a=1;
    for(i=A;i<C-2;i++){
        if(S[i]=='#'&&S[i+1]=='#'){
            a=0;
        }
    }
    for(i=B;i<D-2;i++){
        if(S[i]=='#'&&S[i+1]=='#'){
            a=0;
        }
    }
    b=0;
    if(C>D){
        for(i=B-1;i<D;i++){
            if(S[i-1]=='.'&&S[i]=='.'&&S[i+1]=='.'){
                b=1;
            }
        }
    }else{
        b=1;
    }
    if(a*b){
        cout<<"Yes"<<endl;
    }else{
        cout<<"No"<<endl;
    }
}