import os
import sys
from atexit import register
from io import BytesIO
sys.stdin = BytesIO(os.read(0, os.fstat(0).st_size))
sys.stdout = BytesIO()
register(lambda: os.write(1, sys.stdout.getvalue()))
input = lambda: sys.stdin.readline().rstrip('\r\n')
raw_input = lambda: sys.stdin.readline().rstrip('\r\n')

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

ok1 = True
cnt = 0
for i in xrange(b,d):
    if s[i-1] == "#":
        cnt += 1
        if cnt == 2:
            ok1 = False
            break
    else:
        cnt = 0

ok2 = True
cnt = 0
for i in xrange(a,c):
    if s[i-1] == "#":
        cnt += 1
        if cnt == 2:
            ok2 = False
            break
    else:
        cnt = 0
if d > c: # a->c and b->d
    ok3 = True
else:
    cnt = 0
    ok3 = False
    for i in xrange(b-1,d+2):
        if s[i-1] == ".":
            cnt += 1
            if cnt == 3:
                ok3 = True
                break
        else:
            cnt = 0
if ok1 and ok2 and ok3:
    print("Yes")
else:
    print("No") import os os import sys sys from atexit import register from io import BytesIO sys.stdin = BytesIO(os.read(0, os.fstat(0).st_size)) sys.stdin sys stdin BytesIO(os.read(0, os.fstat(0).st_size)) BytesIO os.read(0, os.fstat(0).st_size) os.read os read 0 os.fstat(0).st_size os.fstat(0) os.fstat os fstat 0 st_size sys.stdout = BytesIO() sys.stdout sys stdout BytesIO() BytesIO register(lambda: os.write(1, sys.stdout.getvalue())) register lambda: os.write(1, sys.stdout.getvalue()) os.write(1, sys.stdout.getvalue()) os.write os write 1 sys.stdout.getvalue() sys.stdout.getvalue sys.stdout sys stdout getvalue input = lambda: sys.stdin.readline().rstrip('\r\n') input lambda: sys.stdin.readline().rstrip('\r\n') sys.stdin.readline().rstrip('\r\n') sys.stdin.readline().rstrip sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline rstrip '\r\n' raw_input = lambda: sys.stdin.readline().rstrip('\r\n') raw_input lambda: sys.stdin.readline().rstrip('\r\n') sys.stdin.readline().rstrip('\r\n') sys.stdin.readline().rstrip sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline rstrip '\r\n' int(x) for x in input().split() for x in input().split() x input().split() ().split () input split for x in input().split() int(x) int x n,a,b,c,d = (int(x) for x in input().split()) n (int(x) for x in input().split()) a b c d s = input() s input() input ok1 = True ok1 True cnt = 0 cnt 0 for i in xrange(b,d):
    if s[i-1] == "#":
        cnt += 1
        if cnt == 2:
            ok1 = False
            break
    else:
        cnt = 0 i xrange(b,d) xrange b d if s[i-1] == "#":
        cnt += 1
        if cnt == 2:
            ok1 = False
            break
    else:
        cnt = 0 s[i-1] == "#" s[i-1] s i-1 i 1 "#" cnt += 1 cnt 1 if cnt == 2:
            ok1 = False
            break
     cnt == 2 cnt 2 ok1 = False ok1 False break cnt = 0 cnt 0 ok2 = True ok2 True cnt = 0 cnt 0 for i in xrange(a,c):
    if s[i-1] == "#":
        cnt += 1
        if cnt == 2:
            ok2 = False
            break
    else:
        cnt = 0 i xrange(a,c) xrange a c if s[i-1] == "#":
        cnt += 1
        if cnt == 2:
            ok2 = False
            break
    else:
        cnt = 0 s[i-1] == "#" s[i-1] s i-1 i 1 "#" cnt += 1 cnt 1 if cnt == 2:
            ok2 = False
            break
     cnt == 2 cnt 2 ok2 = False ok2 False break cnt = 0 cnt 0 if d > c: # a->c and b->d
    ok3 = True
else:
    cnt = 0
    ok3 = False
    for i in xrange(b-1,d+2):
        if s[i-1] == ".":
            cnt += 1
            if cnt == 3:
                ok3 = True
                break
        else:
            cnt = 0 d > c d c ok3 = True ok3 True cnt = 0 cnt 0 ok3 = False ok3 False for i in xrange(b-1,d+2):
        if s[i-1] == ".":
            cnt += 1
            if cnt == 3:
                ok3 = True
                break
        else:
            cnt = 0 i xrange(b-1,d+2) xrange b-1 b 1 d+2 d 2 if s[i-1] == ".":
            cnt += 1
            if cnt == 3:
                ok3 = True
                break
        else:
            cnt = 0 s[i-1] == "." s[i-1] s i-1 i 1 "." cnt += 1 cnt 1 if cnt == 3:
                ok3 = True
                break
         cnt == 3 cnt 3 ok3 = True ok3 True break cnt = 0 cnt 0 if ok1 and ok2 and ok3:
    print("Yes")
else:
    print("No") ok1 and ok2 and ok3 ok1 and ok2 ok1 ok2 ok3 print("Yes") print "Yes" print("No") print "No" s = input() input() s n,a,b,c,d = (int(x) for x in input().split()) (int(x) for x in input().split()) n b,c,d = (int(x) for x in input().split()) (int(x) for x in input().split()) b cnt = 0 0 cnt a,b,c,d = (int(x) for x in input().split()) (int(x) for x in input().split()) a cnt += 1 1 cnt cnt = 0 0 cnt d = (int(x) for x in input().split()) (int(x) for x in input().split()) d cnt = 0 0 cnt ok1 = True True ok1 cnt = 0 0 cnt cnt += 1 1 cnt ok2 = True True ok2 cnt = 0 0 cnt input = lambda: sys.stdin.readline().rstrip('\r\n') lambda: sys.stdin.readline().rstrip('\r\n') input ok3 = True True ok3 cnt += 1 1 cnt raw_input = lambda: sys.stdin.readline().rstrip('\r\n') lambda: sys.stdin.readline().rstrip('\r\n') raw_input ok1 = False False ok1 cnt = 0 0 cnt ok2 = False False ok2 ok3 = False False ok3 c,d = (int(x) for x in input().split()) (int(x) for x in input().split()) c ok3 = True True ok3
import os
import sys
from atexit import register
from io import BytesIO
sys.stdin = BytesIO(os.read(0, os.fstat(0).st_size))
sys.stdout = BytesIO()
register(lambda: os.write(1, sys.stdout.getvalue()))
input = lambda: sys.stdin.readline().rstrip('\r\n')
raw_input = lambda: sys.stdin.readline().rstrip('\r\n')

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

ok1 = True
cnt = 0
for i in xrange(b,d):
    if s[i-1] == "#":
        cnt += 1
        if cnt == 2:
            ok1 = False
            break
    else:
        cnt = 0

ok2 = True
cnt = 0
for i in xrange(a,c):
    if s[i-1] == "#":
        cnt += 1
        if cnt == 2:
            ok2 = False
            break
    else:
        cnt = 0
if d > c: # a->c and b->d
    ok3 = True
else:
    cnt = 0
    ok3 = False
    for i in xrange(b-1,d+2):
        if s[i-1] == ".":
            cnt += 1
            if cnt == 3:
                ok3 = True
                break
        else:
            cnt = 0
if ok1 and ok2 and ok3:
    print("Yes")
else:
    print("No")
