#include <bits/stdc++.h>

using namespace std;

int main(){
    int n,a,b,c,d;
    string s;
    bool match = true;
    cin>>n>>a>>b>>c>>d>>s;
    a--;b--;c--;d--;

    for(int i=a;i<max(c,d);i++){
        if(s[i]=='#'&&s[i+1]=='#')
            match=false;
    }

    if(c>d){
        for(int i=b;i<=d;i++){
            if(s[i-1]=='.'&&s[i]=='.'&&s[i+1]=='.'){
                match = true;
                break;
            }
            match = false;
        }
    }

    if(match)
        cout<<"Yes";
    else
        cout<<"No";
}
