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

from itertools import groupby 

gr = groupby(s)

#AからCへいけるかどうか
for i in range(a-1,c-1):
    if s[i]=='#' and s[i+1]=='#':
        print('No')
        exit(0)
#BからDへいけるかどうか
for i in range(b-1,d-1):
    if s[i]=='#' and s[i+1]=='#':
        print('No')
        exit(0)


if c<b:
    print('Yes')
else:
    if c<d:
        print('Yes')
    else:
        for i in range(b-2,d-1):
            if s[i]=='.' and s[i+1]=='.' and s[i+2]=='.':
                print('Yes')
                exit(0)        
        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 = input() s input() input from itertools import groupby gr = groupby(s) gr groupby(s) groupby s for i in range(a-1,c-1):
    if s[i]=='#' and s[i+1]=='#':
        print('No')
        exit(0)
#BからDへいけるかどうか i range(a-1,c-1) range a-1 a 1 c-1 c 1 if s[i]=='#' and s[i+1]=='#':
        print('No')
        exit(0)
#BからDへいけるかどうか s[i]=='#' and s[i+1]=='#' s[i]=='#' s[i] s i '#' s[i+1]=='#' s[i+1] s i+1 i 1 '#' print('No') print 'No' exit(0) exit 0 for i in range(b-1,d-1):
    if s[i]=='#' and s[i+1]=='#':
        print('No')
        exit(0) i range(b-1,d-1) range b-1 b 1 d-1 d 1 if s[i]=='#' and s[i+1]=='#':
        print('No')
        exit(0) s[i]=='#' and s[i+1]=='#' s[i]=='#' s[i] s i '#' s[i+1]=='#' s[i+1] s i+1 i 1 '#' print('No') print 'No' exit(0) exit 0 if c<b:
    print('Yes')
else:
    if c<d:
        print('Yes')
    else:
        for i in range(b-2,d-1):
            if s[i]=='.' and s[i+1]=='.' and s[i+2]=='.':
                print('Yes')
                exit(0)        
        print('No') c<b c b print('Yes') print 'Yes' if c<d:
        print('Yes')
    else:
        for i in range(b-2,d-1):
            if s[i]=='.' and s[i+1]=='.' and s[i+2]=='.':
                print('Yes')
                exit(0)        
        print('No') c<d c d print('Yes') print 'Yes' for i in range(b-2,d-1):
            if s[i]=='.' and s[i+1]=='.' and s[i+2]=='.':
                print('Yes')
                exit(0)        
         i range(b-2,d-1) range b-2 b 2 d-1 d 1 if s[i]=='.' and s[i+1]=='.' and s[i+2]=='.':
                print('Yes')
                exit(0)        
         s[i]=='.' and s[i+1]=='.' and s[i+2]=='.' s[i]=='.' and s[i+1]=='.' s[i]=='.' s[i] s i '.' s[i+1]=='.' s[i+1] s i+1 i 1 '.' s[i+2]=='.' s[i+2] s i+2 i 2 '.' print('Yes') print 'Yes' exit(0) exit 0 print('No') print 'No' s = input() input() s gr = groupby(s) groupby(s) gr d = map(int,input().split()) map(int,input().split()) d a,b,c,d = map(int,input().split()) map(int,input().split()) a 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
n,a,b,c,d = map(int,input().split())
s = input()

from itertools import groupby 

gr = groupby(s)

#AからCへいけるかどうか
for i in range(a-1,c-1):
    if s[i]=='#' and s[i+1]=='#':
        print('No')
        exit(0)
#BからDへいけるかどうか
for i in range(b-1,d-1):
    if s[i]=='#' and s[i+1]=='#':
        print('No')
        exit(0)


if c<b:
    print('Yes')
else:
    if c<d:
        print('Yes')
    else:
        for i in range(b-2,d-1):
            if s[i]=='.' and s[i+1]=='.' and s[i+2]=='.':
                print('Yes')
                exit(0)        
        print('No')
