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

res = 'Yes'

for i in range(a-1, c-1):
    if s[i] == s[i+1] == '#':
        res = 'No'
        break

if res != 'No':
    if c < d:
        for i in range(b-1, d-1):
            if s[i] == s[i+1] == '#':
                res = 'No'
                break
    else:
        for i in range(b-2, d-1):
            if s[i] == s[i+1] == s[i+2] == '.':
                break
        else:
            res = 'No'

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

res = 'Yes'

for i in range(a-1, c-1):
    if s[i] == s[i+1] == '#':
        res = 'No'
        break

if res != 'No':
    if c < d:
        for i in range(b-1, d-1):
            if s[i] == s[i+1] == '#':
                res = 'No'
                break
    else:
        for i in range(b-2, d-1):
            if s[i] == s[i+1] == s[i+2] == '.':
                break
        else:
            res = 'No'

print(res)
