using System;
using System.Linq;

namespace B
{
    class Program
    {
        static void Main(string[] args)
        {
            var NABCD = Console.ReadLine().Split(' ').Select(int.Parse).ToArray();
            var N = NABCD[0];
            var A = NABCD[1];
            var B = NABCD[2];
            var C = NABCD[3];
            var D = NABCD[4];
            var S = Console.ReadLine();

            var chars = ("#" + S + "##").Cast<char>().ToArray();

            var AP = new Player() { Name = 'A', Current = A, Goal = C };
            var BP = new Player() { Name = 'B', Current = B, Goal = D };

            var players = C > D
                ? new[] { AP, BP }
                : new[] { BP, AP };

            chars[A] = 'A';
            chars[B] = 'B';

            while (true)
            {
                var prev0 = players[0].Current;
                var prev1 = players[1].Current;

                if (players[0].Move(chars))
                {
                    chars[prev0] = '.';
                    chars[players[0].Current] = players[0].Name;
                }
                else if (players[1].Move2(chars))
                {
                    chars[prev1] = '.';
                    chars[players[1].Current] = players[1].Name;
                }
                else
                {
                    break;
                }
            }

            var output = players[0].IsGoal && players[1].IsGoal ? "Yes" : "No";
            Console.WriteLine(output);
        }

        class Player
        {
            public char Name { get; set; }
            public int Current { get; set; }
            public int Goal { get; set; }

            public bool IsGoal => this.Current == this.Goal;

            public bool Move(char[] S)
            {
                if (this.Goal == this.Current)
                {
                    return false;
                }

                if (S[this.Current + 2] == '.')
                {
                    this.Current += 2;
                    return true;
                }
                else if (S[this.Current + 1] == '.')
                {
                    this.Current += 1;
                    return true;
                }
                else
                {
                    return false;
                }
            }
            public bool Move2(char[] S)
            {
                if (this.Goal == this.Current)
                {
                    return false;
                }

                if (S[this.Current + 1] == '.')
                {
                    this.Current += 1;
                    return true;
                }
                else if (S[this.Current + 2] == '.')
                {
                    this.Current += 2;
                    return true;
                }
                else
                {
                    return false;
                }
            }
        }

        static int NumberOfDigits(long x)
        {
            if (x < 10) return 1;

            var result = 0;
            while (x > 0)
            {
                result++;
                x /= 10;
            }

            return result;
        }

        static int SumOfDigits(int x)
        {
            var sum = 0;
            while (x > 0)
            {
                sum += x % 10;
                x /= 10;
            }

            return sum;
        }
    }
}


Measured memory_bytes: 15712