/*
csc -debug A.cs && mono --debug A.exe <<< "7 1 3 6 7
.#..#.."

csc -debug A.cs && mono --debug A.exe <<< "10 1 3 9 7
...#.#..."

15 1 3 15 13
...#.#...#.#...
Yes
*/

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Reflection;

public class HelloWorld {
    public static void SolveCodeForces() {
        var N = cin.NextInt();
        var A = cin.NextInt()-1;
        var B = cin.NextInt()-1;
        var C = cin.NextInt()-1;
        var D = cin.NextInt()-1;

        var S = Console.ReadLine().ToCharArray();

        var ok = true;

        if (D < C)
            ok = CheckSpace(S, B, D);

        if (ok)
            ok = Solve(S, A, C) && Solve(S, B, D);

        System.Console.WriteLine(ok ? "Yes" : "No");
    }

    static bool CheckSpace(char[] S, int a, int b) {
        for (var i = a; i <= b; i++)
            if (S[i-1] == '.' && S[i] == '.' && S[i+1] == '.')
                return true;
        return false;
    }

    static bool Solve(char[] S, int a, int b) {
        for (var i = a+1; i < b; i++) {
            if (S[i] == '#' && S[i-1] == '#')
                return false;
        }
        return true;
    }

    static Scanner cin = new Scanner();
    static StringBuilder cout = new StringBuilder();

    static public void Main () {
        SolveCodeForces();
        // IncreaseStack(SolveCodeForces);
        // System.Console.Write(cout.ToString());
    }

    public static void IncreaseStack(ThreadStart action, int stackSize = 128000000)
    {
        var thread = new Thread(action, stackSize);
        thread.Start();
        thread.Join();
    }
}

public static class Helpers {
    public static T[] CreateArray<T>(int length, Func<int, T> itemCreate) {
        var result = new T[length];
        for (var i = 0; i < result.Length; i++)
            result[i] = itemCreate(i);
        return result;
    }
}

public class Scanner
{
    private string[] line = new string[0];
    private int index = 0;

    public string Next() {
        if (line.Length <= index) {
            line = Console.ReadLine().Split(' ');
            index = 0;
        }
        var res = line[index];
        index++;
        return res;
    }

    public int NextInt() {
        return int.Parse(Next());
    }

    public long NextLong() {
        return long.Parse(Next());
    }

    public ulong NextUlong() {
        return ulong.Parse(Next());
    }

    public string[] Array() {
        line = Console.ReadLine().Split(' ');
        index = line.Length;
        return line;
    }

    public int[] IntArray(int emptyPrefixLen = 0) {
        var array = Array();
        var result = new int[emptyPrefixLen + array.Length];
        for (int i = 0; i < array.Length; i++)
            result[emptyPrefixLen + i] = int.Parse(array[i]);
        return result;
    }

    public long[] LongArray() {
        var array = Array();
        var result = new long[array.Length];
        for (int i = 0; i < array.Length; i++)
            result[i] = long.Parse(array[i]);
        return result;
    }

    public ulong[] UlongArray() {
        var array = Array();
        var result = new ulong[array.Length];
        for (int i = 0; i < array.Length; i++)
            result[i] = ulong.Parse(array[i]);
        return result;
    }
}

Measured memory_bytes: 12000