N,A,B,C,D = map(int,input().split())
S = ['#']+list(input())
CanReach = True
CanChange = False
for i in range(A,C):
    if S[i] == '#' and S[i+1] == '#':
        CanReach = False
for i in range(B,D):
    if S[i] == '#' and S[i+1] == '#':
        CanReach = False
if C < D:
    CanChange = True
else:
    for i in range(B,D+1):
        if S[i-1] == '.' and S[i] == '.' and S[i+1] == '.':
            CanChange = True
if CanReach and CanChange:
    print('Yes')
else:
    print('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 = ['#']+list(input()) S ['#']+list(input()) ['#'] '#' list(input()) list input() input CanReach = True CanReach True CanChange = False CanChange False for i in range(A,C):
    if S[i] == '#' and S[i+1] == '#':
        CanReach = False i range(A,C) range A C if S[i] == '#' and S[i+1] == '#':
        CanReach = False S[i] == '#' and S[i+1] == '#' S[i] == '#' S[i] S i '#' S[i+1] == '#' S[i+1] S i+1 i 1 '#' CanReach = False CanReach False for i in range(B,D):
    if S[i] == '#' and S[i+1] == '#':
        CanReach = False i range(B,D) range B D if S[i] == '#' and S[i+1] == '#':
        CanReach = False S[i] == '#' and S[i+1] == '#' S[i] == '#' S[i] S i '#' S[i+1] == '#' S[i+1] S i+1 i 1 '#' CanReach = False CanReach False if C < D:
    CanChange = True
else:
    for i in range(B,D+1):
        if S[i-1] == '.' and S[i] == '.' and S[i+1] == '.':
            CanChange = True C < D C D CanChange = True CanChange True for i in range(B,D+1):
        if S[i-1] == '.' and S[i] == '.' and S[i+1] == '.':
            CanChange = True i range(B,D+1) range B D+1 D 1 if S[i-1] == '.' and S[i] == '.' and S[i+1] == '.':
            CanChange = True S[i-1] == '.' and S[i] == '.' and S[i+1] == '.' S[i-1] == '.' and S[i] == '.' S[i-1] == '.' S[i-1] S i-1 i 1 '.' S[i] == '.' S[i] S i '.' S[i+1] == '.' S[i+1] S i+1 i 1 '.' CanChange = True CanChange True if CanReach and CanChange:
    print('Yes')
else:
    print('No') CanReach and CanChange CanReach CanChange print('Yes') print 'Yes' print('No') print 'No' B,C,D = map(int,input().split()) map(int,input().split()) B CanReach = False False CanReach CanReach = False False CanReach N,A,B,C,D = map(int,input().split()) map(int,input().split()) N D = map(int,input().split()) map(int,input().split()) D CanReach = True True CanReach CanChange = False False CanChange A,B,C,D = map(int,input().split()) map(int,input().split()) A CanChange = True True CanChange CanChange = True True CanChange C,D = map(int,input().split()) map(int,input().split()) C S = ['#']+list(input()) ['#']+list(input()) S
N,A,B,C,D = map(int,input().split())
S = ['#']+list(input())
CanReach = True
CanChange = False
for i in range(A,C):
    if S[i] == '#' and S[i+1] == '#':
        CanReach = False
for i in range(B,D):
    if S[i] == '#' and S[i+1] == '#':
        CanReach = False
if C < D:
    CanChange = True
else:
    for i in range(B,D+1):
        if S[i-1] == '.' and S[i] == '.' and S[i+1] == '.':
            CanChange = True
if CanReach and CanChange:
    print('Yes')
else:
    print('No')