n, a, b, c, d = list(map(int, input().split()))
s = input()

last = "."
for i in range(a, max(c, d)):
    if last == "#" and s[i] == "#":
        print("No")
        exit()
    last = s[i]

if c < d:
    print("Yes")
else:
    length = 0
    for i in range(b-2, d+1):
        if s[i] == ".":
            length += 1

            if length == 3:
                print("Yes")
                exit()
        else:
            length = 0

    print("No") n, a, b, c, d = list(map(int, input().split())) n list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split a b c d s = input() s input() input last = "." last "." for i in range(a, max(c, d)):
    if last == "#" and s[i] == "#":
        print("No")
        exit()
    last = s[i] i range(a, max(c, d)) range a max(c, d) max c d if last == "#" and s[i] == "#":
        print("No")
        exit()
     last == "#" and s[i] == "#" last == "#" last "#" s[i] == "#" s[i] s i "#" print("No") print "No" exit() exit last = s[i] last s[i] s i if c < d:
    print("Yes")
else:
    length = 0
    for i in range(b-2, d+1):
        if s[i] == ".":
            length += 1

            if length == 3:
                print("Yes")
                exit()
        else:
            length = 0

    print("No") c < d c d print("Yes") print "Yes" length = 0 length 0 for i in range(b-2, d+1):
        if s[i] == ".":
            length += 1

            if length == 3:
                print("Yes")
                exit()
        else:
            length = 0

     i range(b-2, d+1) range b-2 b 2 d+1 d 1 if s[i] == ".":
            length += 1

            if length == 3:
                print("Yes")
                exit()
        else:
            length = 0

     s[i] == "." s[i] s i "." length += 1 length 1 if length == 3:
                print("Yes")
                exit()
         length == 3 length 3 print("Yes") print "Yes" exit() exit length = 0 length 0 print("No") print "No" last = "." "." last d = list(map(int, input().split())) list(map(int, input().split())) d c, d = list(map(int, input().split())) list(map(int, input().split())) c last = s[i] s[i] last s = input() input() s n, a, b, c, d = list(map(int, input().split())) list(map(int, input().split())) n length = 0 0 length length = 0 0 length b, c, d = list(map(int, input().split())) list(map(int, input().split())) b length += 1 1 length a, b, c, d = list(map(int, input().split())) list(map(int, input().split())) a
n, a, b, c, d = list(map(int, input().split()))
s = input()

last = "."
for i in range(a, max(c, d)):
    if last == "#" and s[i] == "#":
        print("No")
        exit()
    last = s[i]

if c < d:
    print("Yes")
else:
    length = 0
    for i in range(b-2, d+1):
        if s[i] == ".":
            length += 1

            if length == 3:
                print("Yes")
                exit()
        else:
            length = 0

    print("No")