n,a,b,c,d = (int(i) for i in input().split())  

s = eval(input())

e = 0

if c<d:

  if s[a:c-1].count("##")==0 and s[b:d-1].count("##")==0:

    print("Yes")

  else:

    print("No")

else:

  if s[a:c-1].count("##")==0 and s[b:d-1].count("##")==0:

    for i in range(b-1,d):

      if s[i-1:i+2]=="..." :

        e = 1 

    if e == 1:

      print("Yes")

    else:

      print("No")

  else:

    print("No")



n,a,b,c,d = (int(i) for i in input().split())  

s = eval(input())

e = 0

if c<d:

  if s[a:c-1].count("##")==0 and s[b:d-1].count("##")==0:

    print("Yes")

  else:

    print("No")

else:

  if s[a:c-1].count("##")==0 and s[b:d-1].count("##")==0 and s[b-2:d+1].count("...")>0:

    print("Yes")

  else:

    print("No")





n, a, b, c, d = (int(i) for i in input().split())
s = eval(input())
e = 0
if c < d:
    if s[a : c - 1].count("##") == 0 and s[b : d - 1].count("##") == 0:
        print("Yes")
    else:
        print("No")
else:
    if s[a : c - 1].count("##") == 0 and s[b : d - 1].count("##") == 0:
        for i in range(b - 1, d):
            if s[i - 1 : i + 2] == "...":
                e = 1
        if e == 1:
            print("Yes")
        else:
            print("No")
    else:
        print("No")

n, a, b, c, d = (int(i) for i in input().split())
s = eval(input())
e = 0
if c < d:
    if s[a : c - 1].count("##") == 0 and s[b : d - 1].count("##") == 0:
        print("Yes")
    else:
        print("No")
else:
    if (
        s[a : c - 1].count("##") == 0
        and s[b : d - 1].count("##") == 0
        and s[b - 2 : d + 1].count("...") > 0
    ):
        print("Yes")
    else:
        print("No")

-    if s[a : c - 1].count("##") == 0 and s[b : d - 1].count("##") == 0: -        for i in range(b - 1, d): -            if s[i - 1 : i + 2] == "...": -                e = 1 -        if e == 1: -            print("Yes") -        else: -            print("No") +    if ( +        s[a : c - 1].count("##") == 0 +        and s[b : d - 1].count("##") == 0 +        and s[b - 2 : d + 1].count("...") > 0 +    ): +        print("Yes")