n,a,b,c,d = map(int,input().split())
s = '.'+input()
i=a
f = True
while i<c:
    if s[i+1]=='.':
        i += 1
    elif i<c-1 and s[i+2]=='.':
        i += 2
    else:
        f = False
        break
i = b
ok = False
while i<d:
    if s[i-1:i+2]=='...':
        ok = True
    if s[i+1]=='.':
        i += 1
    elif i<d-1 and s[i+2]=='.':
        i += 2
    else:
        f = False
        break
if d<n and s[d-1:d+2]=='...':ok=True
if d<c and not ok:f=False
print('Yes' if f else 'No') 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() input i=a i a f = True f True while i<c:
    if s[i+1]=='.':
        i += 1
    elif i<c-1 and s[i+2]=='.':
        i += 2
    else:
        f = False
        break i<c i c if s[i+1]=='.':
        i += 1
    elif i<c-1 and s[i+2]=='.':
        i += 2
    else:
        f = False
        break s[i+1]=='.' s[i+1] s i+1 i 1 '.' i += 1 i 1 elif i<c-1 and s[i+2]=='.':
        i += 2
     i<c-1 and s[i+2]=='.' i<c-1 i c-1 c 1 s[i+2]=='.' s[i+2] s i+2 i 2 '.' i += 2 i 2 f = False f False break i = b i b ok = False ok False while i<d:
    if s[i-1:i+2]=='...':
        ok = True
    if s[i+1]=='.':
        i += 1
    elif i<d-1 and s[i+2]=='.':
        i += 2
    else:
        f = False
        break i<d i d if s[i-1:i+2]=='...':
        ok = True
     s[i-1:i+2]=='...' s[i-1:i+2] s i-1:i+2 i-1 i 1 i+2 i 2 '...' ok = True ok True if s[i+1]=='.':
        i += 1
    elif i<d-1 and s[i+2]=='.':
        i += 2
    else:
        f = False
        break s[i+1]=='.' s[i+1] s i+1 i 1 '.' i += 1 i 1 elif i<d-1 and s[i+2]=='.':
        i += 2
     i<d-1 and s[i+2]=='.' i<d-1 i d-1 d 1 s[i+2]=='.' s[i+2] s i+2 i 2 '.' i += 2 i 2 f = False f False break if d<n and s[d-1:d+2]=='...':ok=True d<n and s[d-1:d+2]=='...' d<n d n s[d-1:d+2]=='...' s[d-1:d+2] s d-1:d+2 d-1 d 1 d+2 d 2 '...' if d<c and not ok:f=False d<c and not ok d<c d c not ok ok print('Yes' if f else 'No') print 'Yes' if f else 'No' f 'Yes' 'No' f = True True f i += 2 2 i ok = True True ok i += 1 1 i c,d = map(int,input().split()) map(int,input().split()) c f = False False f a,b,c,d = map(int,input().split()) map(int,input().split()) a i=a a i f = False False f s = '.'+input() '.'+input() s n,a,b,c,d = map(int,input().split()) map(int,input().split()) n d = map(int,input().split()) map(int,input().split()) d i = b b i ok = False False ok b,c,d = map(int,input().split()) map(int,input().split()) b i += 2 2 i i += 1 1 i
n,a,b,c,d = map(int,input().split())
s = '.'+input()
i=a
f = True
while i<c:
    if s[i+1]=='.':
        i += 1
    elif i<c-1 and s[i+2]=='.':
        i += 2
    else:
        f = False
        break
i = b
ok = False
while i<d:
    if s[i-1:i+2]=='...':
        ok = True
    if s[i+1]=='.':
        i += 1
    elif i<d-1 and s[i+2]=='.':
        i += 2
    else:
        f = False
        break
if d<n and s[d-1:d+2]=='...':ok=True
if d<c and not ok:f=False
print('Yes' if f else 'No')