import sys
N, A, B, C, D = map(int, input().split())
s = input()
if C < D:
    for x, y in zip(s[A:], s[A+1:D]):
        if x == '#' and y == '#':
            print('No')
            sys.exit()
    print('Yes')
else:
    for x, y in zip(s[A:], s[A+1:C]):
        if x == '#' and y == '#':
            print('No')
            sys.exit()
    for x, y, z in zip(s[B-2:], s[B-1:], s[B:D+1]):
        if x == '.' and y == '.' and z == '.':
            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 s = input() s input() input if C < D:
    for x, y in zip(s[A:], s[A+1:D]):
        if x == '#' and y == '#':
            print('No')
            sys.exit()
    print('Yes')
else:
    for x, y in zip(s[A:], s[A+1:C]):
        if x == '#' and y == '#':
            print('No')
            sys.exit()
    for x, y, z in zip(s[B-2:], s[B-1:], s[B:D+1]):
        if x == '.' and y == '.' and z == '.':
            print('Yes')
            sys.exit()
    print('No') C < D C D for x, y in zip(s[A:], s[A+1:D]):
        if x == '#' and y == '#':
            print('No')
            sys.exit()
     x y zip(s[A:], s[A+1:D]) zip s[A:] s A: A s[A+1:D] s A+1:D A+1 A 1 D if x == '#' and y == '#':
            print('No')
            sys.exit()
     x == '#' and y == '#' x == '#' x '#' y == '#' y '#' print('No') print 'No' sys.exit() sys.exit sys exit print('Yes') print 'Yes' for x, y in zip(s[A:], s[A+1:C]):
        if x == '#' and y == '#':
            print('No')
            sys.exit()
     x y zip(s[A:], s[A+1:C]) zip s[A:] s A: A s[A+1:C] s A+1:C A+1 A 1 C if x == '#' and y == '#':
            print('No')
            sys.exit()
     x == '#' and y == '#' x == '#' x '#' y == '#' y '#' print('No') print 'No' sys.exit() sys.exit sys exit for x, y, z in zip(s[B-2:], s[B-1:], s[B:D+1]):
        if x == '.' and y == '.' and z == '.':
            print('Yes')
            sys.exit()
     x y z zip(s[B-2:], s[B-1:], s[B:D+1]) zip s[B-2:] s B-2: B-2 B 2 s[B-1:] s B-1: B-1 B 1 s[B:D+1] s B:D+1 B D+1 D 1 if x == '.' and y == '.' and z == '.':
            print('Yes')
            sys.exit()
     x == '.' and y == '.' and z == '.' x == '.' and y == '.' x == '.' x '.' y == '.' y '.' z == '.' z '.' print('Yes') print 'Yes' sys.exit() sys.exit sys exit print('No') print 'No' 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 D = map(int, input().split()) map(int, input().split()) D s = input() input() s 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
import sys
N, A, B, C, D = map(int, input().split())
s = input()
if C < D:
    for x, y in zip(s[A:], s[A+1:D]):
        if x == '#' and y == '#':
            print('No')
            sys.exit()
    print('Yes')
else:
    for x, y in zip(s[A:], s[A+1:C]):
        if x == '#' and y == '#':
            print('No')
            sys.exit()
    for x, y, z in zip(s[B-2:], s[B-1:], s[B:D+1]):
        if x == '.' and y == '.' and z == '.':
            print('Yes')
            sys.exit()
    print('No')