using System;
using static System.Console;
using System.Text;
using System.Linq;
using static System.Math;
using System.Collections.Generic;
using System.Threading.Tasks;
using System.IO;
using System.Diagnostics;

class Program
{
    public static cp alg;
    public static bool[][] memo;
    public static int count = 0;
    public static int N;
    public static int A;
    public static int B;
    public static int C;
    public static int D;
    public static string S;
    //public static int[] A;
    //public static int[][] AB;
    //public static int[] B;
    //public static int[] C;
    static void Main(string[] args)
    {
        alg = new cp();
        var temp=alg.inputSplitInt();
        N = temp[0];
        A = temp[1] - 1;
        B = temp[2] - 1;
        C = temp[3] - 1;
        D = temp[4] - 1;
        S = alg.inputString();
        bool f = false;
        //A C B D
        //A B C D
        //A B D C
        if (A<C&&C<B&&B<D)
        {
            if (alg.countString(S.Substring(A + 1, C - A + 1 - 2), "##") == 0 && alg.countString(S.Substring(A + 1, C - A + 1 - 2), "##") == 0)
            {
                f = true;
            }
        }
        else if (A < B && B < C && C < D)
        {
            if (alg.countString(S.Substring(B + 1, D - B + 1 - 2), "##") == 0)
            {
                if (alg.countString(S.Substring(A + 1, C - A + 1 - 2), "##") == 0)
                {
                    f = true;
                }
            }
        }
        else
        {
            if (alg.countString(S.Substring(B + 1, D - B + 1 - 2), "##") == 0)
            {
                for (int a = B; a <= D; a++)
                {
                    if (S[a] == '#') continue;
                    if (!(S[a-1]=='#'||S[a+1]=='#'))
                    {
                        f = true;
                    }
                }
            }
        }
        
        


        WriteLine(alg.Yn(f));
    }
    static void hoge(int index1,int index2)
    {
        if (index1 >= N || index2 >= N) return;
        if (memo[index1][index2] == true) return;
        memo[index1][index2] = true;
        if (S[index1] == '#' || S[index2] == '#') return;
        if (index1==index2) return;

        count++;

        hoge(index1+1,index2);
        hoge(index1+2,index2);
        hoge(index1,index2+1);
        hoge(index1,index2+2);
    }
}

class cp
{

    public cp()
    {
    }
    public string subChar(string s,int index,char c)
    {
        char[] arr= s.ToCharArray();
        arr[index] = c;
        return new string(arr);
    }
    public int GCD(int a, int b)
    {
        return a % b == 0 ? b : GCD(b, a % b);
    }
    public int LCM(int a, int b)
    {
        return a * b / GCD(a, b);
    }
    public int countString(string s, string key)
    {
        return (s.Length - s.Replace(key, "").Length)/key.Length;
    }
    public string Yn(bool f)
    {
        if (f)
        {
            return "Yes";
        }
        else
        {
            return "No";
        }
    }
    public string YN(bool f)
    {
        if (f)
        {
            return "YES";
        }
        else
        {
            return "NO";
        }
    }
    public string yn(bool f)
    {
        if (f)
        {
            return "yes";
        }
        else
        {
            return "no";
        }
    }
    public void inputSkip()
    {
        ReadLine();
        return;
    }
    public string inputString()
    {
        return ReadLine();
    }
    public string[] inputSplitString()
    {
        return ReadLine().Split();
    }
    public string[] inputLinesString(int len)
    {
        var arr = new string[len];
        for (int a = 0; a < len; a++)
        {
            arr[a] = ReadLine();
        }
        return arr;
    }
    public string[][] inputJaggedArrayString(int len)
    {
        var arr = new string[len][];
        for (int a = 0; a < len; a++)
        {
            arr[a] = ReadLine().Split();
        }
        return arr;
    }
    public int inputInt()
    {
        return int.Parse(ReadLine());
    }
    public int[] inputSplitInt()
    {
        return ReadLine().Split().Select(i => int.Parse(i)).ToArray();
    }
    public int[] inputLinesInt(int len)
    {
        var arr = new int[len];
        for (int a = 0; a < len; a++)
        {
            arr[a] = int.Parse(ReadLine());
        }
        return arr;
    }
    public int[][] inputJaggedArrayInt(int len)
    {
        var arr = new int[len][];
        for (int a = 0; a < len; a++)
        {
            arr[a] = ReadLine().Split().Select(i => int.Parse(i)).ToArray();
        }
        return arr;
    }
    public long inputLong()
    {
        return long.Parse(ReadLine());
    }
    public long[] inputSplitLong()
    {
        return ReadLine().Split().Select(i => long.Parse(i)).ToArray();
    }
    public long[] inputLinesLong(long len)
    {
        var arr = new long[len];
        for (int a = 0; a < len; a++)
        {
            arr[a] = long.Parse(ReadLine());
        }
        return arr;
    }
    public long[][] inputJaggedArrayLong(int len)
    {
        var arr = new long[len][];
        for (int a = 0; a < len; a++)
        {
            arr[a] = ReadLine().Split().Select(i => long.Parse(i)).ToArray();
        }
        return arr;
    }
    public double inputDouble()
    {
        return double.Parse(ReadLine());
    }
    public double[] inputSplitDouble()
    {
        return ReadLine().Split().Select(i => double.Parse(i)).ToArray();
    }
    public double[] inputLinesDouble(int len)
    {
        var arr = new double[len];
        for (int a = 0; a < len; a++)
        {
            arr[a] = double.Parse(ReadLine());
        }
        return arr;
    }
    public double[][] inputJaggedArrayDouble(int len)
    {
        var arr = new double[len][];
        for (int a = 0; a < len; a++)
        {
            arr[a] = ReadLine().Split().Select(i => double.Parse(i)).ToArray();
        }
        return arr;
    }
}

Measured memory_bytes: 14292