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