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

a,b,c,d = a-1,b-1,c-1,d-1

cnt = 0
for i in range(a,max(c,d)+1):
    if s[i] == '#':
        cnt += 1
        if cnt >= 2:
            print('No')
            exit()
    else:
        cnt = 0

cnt = 0
if b >= 2:
    if s[b-2] == '.' and s[b-1] == '.':
        cnt = 2

if s[b-1] == '.':
    cnt = 1

if c > d:
    if s[d-1] == '.' and s[d+1] == '.':
        print('Yes')
        exit() 
    for i in range(b,d+1):
        if s[i] == '.':
            cnt += 1
            if cnt >= 3:
                print('Yes')
                exit()
        else:
            cnt = 0
        if i == d:
            print('No')
            exit()
else:
    print('Yes')
 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 = str(input()) s str(input()) str input() input a,b,c,d = a-1,b-1,c-1,d-1 a a-1 a 1 b b-1 b 1 c c-1 c 1 d d-1 d 1 cnt = 0 cnt 0 for i in range(a,max(c,d)+1):
    if s[i] == '#':
        cnt += 1
        if cnt >= 2:
            print('No')
            exit()
    else:
        cnt = 0 i range(a,max(c,d)+1) range a max(c,d)+1 max(c,d) max c d 1 if s[i] == '#':
        cnt += 1
        if cnt >= 2:
            print('No')
            exit()
    else:
        cnt = 0 s[i] == '#' s[i] s i '#' cnt += 1 cnt 1 if cnt >= 2:
            print('No')
            exit()
     cnt >= 2 cnt 2 print('No') print 'No' exit() exit cnt = 0 cnt 0 cnt = 0 cnt 0 if b >= 2:
    if s[b-2] == '.' and s[b-1] == '.':
        cnt = 2 b >= 2 b 2 if s[b-2] == '.' and s[b-1] == '.':
        cnt = 2 s[b-2] == '.' and s[b-1] == '.' s[b-2] == '.' s[b-2] s b-2 b 2 '.' s[b-1] == '.' s[b-1] s b-1 b 1 '.' cnt = 2 cnt 2 if s[b-1] == '.':
    cnt = 1 s[b-1] == '.' s[b-1] s b-1 b 1 '.' cnt = 1 cnt 1 if c > d:
    if s[d-1] == '.' and s[d+1] == '.':
        print('Yes')
        exit() 
    for i in range(b,d+1):
        if s[i] == '.':
            cnt += 1
            if cnt >= 3:
                print('Yes')
                exit()
        else:
            cnt = 0
        if i == d:
            print('No')
            exit()
else:
    print('Yes') c > d c d if s[d-1] == '.' and s[d+1] == '.':
        print('Yes')
        exit() 
     s[d-1] == '.' and s[d+1] == '.' s[d-1] == '.' s[d-1] s d-1 d 1 '.' s[d+1] == '.' s[d+1] s d+1 d 1 '.' print('Yes') print 'Yes' exit() exit for i in range(b,d+1):
        if s[i] == '.':
            cnt += 1
            if cnt >= 3:
                print('Yes')
                exit()
        else:
            cnt = 0
        if i == d:
            print('No')
            exit() i range(b,d+1) range b d+1 d 1 if s[i] == '.':
            cnt += 1
            if cnt >= 3:
                print('Yes')
                exit()
        else:
            cnt = 0
         s[i] == '.' s[i] s i '.' cnt += 1 cnt 1 if cnt >= 3:
                print('Yes')
                exit()
         cnt >= 3 cnt 3 print('Yes') print 'Yes' exit() exit cnt = 0 cnt 0 if i == d:
            print('No')
            exit() i == d i d print('No') print 'No' exit() exit print('Yes') print 'Yes' c,d = a-1,b-1,c-1,d-1 c-1 c cnt = 0 0 cnt cnt = 0 0 cnt c,d = map(int, input().split()) map(int, input().split()) c cnt = 2 2 cnt b,c,d = a-1,b-1,c-1,d-1 b-1 b cnt = 1 1 cnt d = map(int, input().split()) map(int, input().split()) d d = a-1,b-1,c-1,d-1 d-1 d cnt = 0 0 cnt cnt += 1 1 cnt n,a,b,c,d = map(int, input().split()) map(int, input().split()) n s = str(input()) str(input()) s b,c,d = map(int, input().split()) map(int, input().split()) b cnt += 1 1 cnt cnt = 0 0 cnt a,b,c,d = a-1,b-1,c-1,d-1 a-1 a a,b,c,d = map(int, input().split()) map(int, input().split()) a
n,a,b,c,d = map(int, input().split())
s = str(input())

a,b,c,d = a-1,b-1,c-1,d-1

cnt = 0
for i in range(a,max(c,d)+1):
    if s[i] == '#':
        cnt += 1
        if cnt >= 2:
            print('No')
            exit()
    else:
        cnt = 0

cnt = 0
if b >= 2:
    if s[b-2] == '.' and s[b-1] == '.':
        cnt = 2

if s[b-1] == '.':
    cnt = 1

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

