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