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

cant = False
if c>d:
        cant = True
        for i in range(max(0,b-2), min(d-1, n-2)):
                if s[i]==s[i+1]==s[i+2]=='.': cant = False

for i in range(b-1, d-1):
        if s[i]==s[i+1]=='#': cant = True
for i in range(a-1, c-1):
        if s[i]==s[i+1]=='#': cant = True

print("YNeos"[cant::2]) 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 = list(input()) s list(input()) list input() input cant = False cant False if c>d:
        cant = True
        for i in range(max(0,b-2), min(d-1, n-2)):
                if s[i]==s[i+1]==s[i+2]=='.': cant = False c>d c d cant = True cant True for i in range(max(0,b-2), min(d-1, n-2)):
                if s[i]==s[i+1]==s[i+2]=='.': cant = False i range(max(0,b-2), min(d-1, n-2)) range max(0,b-2) max 0 b-2 b 2 min(d-1, n-2) min d-1 d 1 n-2 n 2 if s[i]==s[i+1]==s[i+2]==' s[i]==s[i+1]==s[i+2]=='.' s[i]==s[i+1]==s[i+2] s[i]==s[i+1] s[i] s i s[i+1] s i+1 i 1 s[i+2] s i+2 i 2 '.' for i in range(b-1, d-1):
        if s[i]==s[i+1]=='#': cant = True i range(b-1, d-1) range b-1 b 1 d-1 d 1 if s[i]==s[i+1]=='#': can s[i]==s[i+1]=='#' s[i]==s[i+1] s[i] s i s[i+1] s i+1 i 1 '#' for i in range(a-1, c-1):
        if s[i]==s[i+1]=='#': cant = True i range(a-1, c-1) range a-1 a 1 c-1 c 1 if s[i]==s[i+1]=='#': can s[i]==s[i+1]=='#' s[i]==s[i+1] s[i] s i s[i+1] s i+1 i 1 '#' print("YNeos"[cant::2]) print "YNeos"[cant::2] "YNeos" cant::2 cant 2 b, c, d = map(int, input().split()) map(int, input().split()) b d = map(int, input().split()) map(int, input().split()) d cant = False False cant c, d = map(int, input().split()) map(int, input().split()) c s = list(input()) list(input()) s cant = True True cant n, a, b, c, d = map(int, input().split()) map(int, input().split()) n a, b, c, d = map(int, input().split()) map(int, input().split()) a
n, a, b, c, d = map(int, input().split())
s = list(input())

cant = False
if c>d:
        cant = True
        for i in range(max(0,b-2), min(d-1, n-2)):
                if s[i]==s[i+1]==s[i+2]=='.': cant = False

for i in range(b-1, d-1):
        if s[i]==s[i+1]=='#': cant = True
for i in range(a-1, c-1):
        if s[i]==s[i+1]=='#': cant = True

print("YNeos"[cant::2])