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