from itertools import groupby
n, a, b, c, d = map(int, input().split())
s = input()

g = groupby(s[a:c])
h = groupby(s[b:d])

for i, j in g:
    if i == "#" and len(list(j)) > 1:
        print("No")
        exit()

for i, j in h:
    if i == "#" and len(list(j)) > 1:
        print("No")
        exit()

if c < d:
    print("Yes")
    exit()

e = groupby(s[b-2:d+1])
for i, j in e:
    if i == "." and len(list(j)) > 2:
        print("Yes")
        exit()

print("No") from itertools import groupby n, a, b, c, d = map(int, input().split()) n map(int, input().split()) map int input().split() ().split () input split a b c d s = input() s input() input g = groupby(s[a:c]) g groupby(s[a:c]) groupby s[a:c] s a:c a c h = groupby(s[b:d]) h groupby(s[b:d]) groupby s[b:d] s b:d b d for i, j in g:
    if i == "#" and len(list(j)) > 1:
        print("No")
        exit() i j g if i == "#" and len(list(j)) > 1:
        print("No")
        exit() i == "#" and len(list(j)) > 1 i == "#" i "#" len(list(j)) > 1 len(list(j)) len list(j) list j 1 print("No") print "No" exit() exit for i, j in h:
    if i == "#" and len(list(j)) > 1:
        print("No")
        exit() i j h if i == "#" and len(list(j)) > 1:
        print("No")
        exit() i == "#" and len(list(j)) > 1 i == "#" i "#" len(list(j)) > 1 len(list(j)) len list(j) list j 1 print("No") print "No" exit() exit if c < d:
    print("Yes")
    exit() c < d c d print("Yes") print "Yes" exit() exit e = groupby(s[b-2:d+1]) e groupby(s[b-2:d+1]) groupby s[b-2:d+1] s b-2:d+1 b-2 b 2 d+1 d 1 for i, j in e:
    if i == "." and len(list(j)) > 2:
        print("Yes")
        exit() i j e if i == "." and len(list(j)) > 2:
        print("Yes")
        exit() i == "." and len(list(j)) > 2 i == "." i "." len(list(j)) > 2 len(list(j)) len list(j) list j 2 print("Yes") print "Yes" exit() exit print("No") print "No" g = groupby(s[a:c]) groupby(s[a:c]) g n, a, b, c, d = map(int, input().split()) map(int, input().split()) n c, d = map(int, input().split()) map(int, input().split()) c b, c, d = map(int, input().split()) map(int, input().split()) b d = map(int, input().split()) map(int, input().split()) d e = groupby(s[b-2:d+1]) groupby(s[b-2:d+1]) e a, b, c, d = map(int, input().split()) map(int, input().split()) a h = groupby(s[b:d]) groupby(s[b:d]) h s = input() input() s
from itertools import groupby
n, a, b, c, d = map(int, input().split())
s = input()

g = groupby(s[a:c])
h = groupby(s[b:d])

for i, j in g:
    if i == "#" and len(list(j)) > 1:
        print("No")
        exit()

for i, j in h:
    if i == "#" and len(list(j)) > 1:
        print("No")
        exit()

if c < d:
    print("Yes")
    exit()

e = groupby(s[b-2:d+1])
for i, j in e:
    if i == "." and len(list(j)) > 2:
        print("Yes")
        exit()

print("No")