# https://atcoder.jp/contests/agc034/tasks/agc034_a
import sys
n, a, b, c, d = map(int, input().split())
s = list(input())

for i in range(a - 1, c - 1):
    if s[i] == '#' and s[i + 1] == '#':
        print('No')
        sys.exit()

for i in range(b - 1, d - 1):
    if s[i] == '#' and s[i + 1] == '#':
        print('No')
        sys.exit()

if c > d:
    f = False
    for i in range(b - 2, d - 1):
        if s[i] == '.' and s[i + 1] == '.' and s[i + 2] == '.':
            f = True
else:
    f = True
if f:
    print('Yes')
else:
    print('No') import sys sys 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 for i in range(a - 1, c - 1):
    if s[i] == '#' and s[i + 1] == '#':
        print('No')
        sys.exit() i range(a - 1, c - 1) range a - 1 a 1 c - 1 c 1 if s[i] == '#' and s[i + 1] == '#':
        print('No')
        sys.exit() 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' sys.exit() sys.exit sys exit for i in range(b - 1, d - 1):
    if s[i] == '#' and s[i + 1] == '#':
        print('No')
        sys.exit() i range(b - 1, d - 1) range b - 1 b 1 d - 1 d 1 if s[i] == '#' and s[i + 1] == '#':
        print('No')
        sys.exit() 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' sys.exit() sys.exit sys exit if c > d:
    f = False
    for i in range(b - 2, d - 1):
        if s[i] == '.' and s[i + 1] == '.' and s[i + 2] == '.':
            f = True
else:
    f = True c > d c d f = False f False for i in range(b - 2, d - 1):
        if s[i] == '.' and s[i + 1] == '.' and s[i + 2] == '.':
            f = True 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] == '.':
            f = True 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 '.' f = True f True f = True f True if f:
    print('Yes')
else:
    print('No') f print('Yes') print 'Yes' print('No') print 'No' d = map(int, input().split()) map(int, input().split()) d b, c, d = map(int, input().split()) map(int, input().split()) b f = True True f f = True True f n, a, b, c, d = map(int, input().split()) map(int, input().split()) n s = list(input()) list(input()) s a, b, c, d = map(int, input().split()) map(int, input().split()) a f = False False f c, d = map(int, input().split()) map(int, input().split()) c
# https://atcoder.jp/contests/agc034/tasks/agc034_a
import sys
n, a, b, c, d = map(int, input().split())
s = list(input())

for i in range(a - 1, c - 1):
    if s[i] == '#' and s[i + 1] == '#':
        print('No')
        sys.exit()

for i in range(b - 1, d - 1):
    if s[i] == '#' and s[i + 1] == '#':
        print('No')
        sys.exit()

if c > d:
    f = False
    for i in range(b - 2, d - 1):
        if s[i] == '.' and s[i + 1] == '.' and s[i + 2] == '.':
            f = True
else:
    f = True
if f:
    print('Yes')
else:
    print('No')