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

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

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

if c < d:
    print('Yes')
    exit()

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

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

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

if c < d:
    print('Yes')
    exit()

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