import sys

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

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

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

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

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

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

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

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

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

print('No')