using System;
using System.Linq;
using System.Collections.Generic;
using System.IO;

namespace atcorder2
{
    class Program
    {
        public static long Read()
        {
            return long.Parse(Console.ReadLine());
        }

        public static long[] Reads()
        {

            return Console.ReadLine().Split().Select(long.Parse).ToArray();
        }

        public static long C(long n, long k)
        {
            long bunbo = 1;
            long bunsi = 1;
            for (long i = n - k; i <= n; i++)
                bunsi *= i;
            for (long i = 1; i <= n - k; i++)
                bunbo *= i;
            return bunsi / bunbo;
        }
        static void Main(string[] args)
        {
            var sw = new StreamWriter(Console.OpenStandardOutput()) { AutoFlush = false };
            Console.SetOut(sw);
            var input = Reads();
            var n = input[0];
            var a = input[1];
            var b = input[2];
            var c = input[3];
            var d = input[4];
            var s = Console.ReadLine().ToCharArray();
            bool f = true;
            if (c < d)
            {
                while (b < d)
                {
                    if (s[b + 1 - 1] == '.')
                        b++;
                    else if (b + 2 <= d && s[b + 2 - 1] == '.')
                        b += 2;
                    else
                    { break; }
                }
                if (f)
                {
                    while (a < c)
                    {
                        if (s[a + 1 - 1] == '.')
                            a++;
                        else if (a + 2 <= c && s[a + 2 - 1] == '.')
                            a += 2;
                        else
                        { break; }
                    }
                }
            }
            else
            {
                while (a <= c&&b<=d)
                {
                    if (a + 1 != b && a + 1 <= c &&s[a + 1 - 1] == '.')
                        a++;
                    else if (a + 2 != b && a + 2 <= c && s[a + 2 - 1] == '.')
                        a += 2;
                    else if (a + 1 == b)
                    {
                        if (b + 1 <= d && s[b + 1 - 1] == '.')
                            b++;
                        else if (b + 2 <= d && s[b + 2 - 1] == '.')
                            b += 2;
                        else
                            break;
                    }
                    else if (a + 2 == b)
                    {
                        if (b + 1 <= d && s[b + 1 - 1] == '.')
                            b++;
                        else if (b + 2 <= d && s[b + 2 - 1] == '.')
                            b += 2;
                        else
                            break;
                    }
                    else 
                      break; 
                    
                }
                while (b <= d)
                {
                    if (b+1<=d&&s[b + 1 - 1] == '.')
                        b++;
                    else if (b + 2 <= d && s[b + 2 - 1] == '.')
                        b += 2;
                    else
                    break; 
               
                }
            }
            if (a==c&&b==d)
                Console.WriteLine("Yes");
            else
                Console.WriteLine("No");


            Console.Out.Flush();
        }
    }
}

Measured memory_bytes: 14304