import re
n,a,b,c,d = map(int,input().split())
s = input()
#a,b,c,d = map(lambda x:x-1,[a,b,c,d])

if re.search(r'##',s[a-1:max(b,d)]):
    print('No')
else:
    if c>d:
        if (re.search(r'\.{3,}',s[b-2:d+1])):
            print('Yes')
        else:
            print('No')
    else:
        print('Yes') import re re 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 re.search(r'##',s[a-1:max(b,d)]):
    print('No')
else:
    if c>d:
        if (re.search(r'\.{3,}',s[b-2:d+1])):
            print('Yes')
        else:
            print('No')
    else:
        print('Yes') re.search(r'##',s[a-1:max(b,d)]) re.search re search r'##' s[a-1:max(b,d)] s a-1:max(b,d) a-1 a 1 max(b,d) max b d print('No') print 'No' if c>d:
        if (re.search(r'\.{3,}',s[b-2:d+1])):
            print('Yes')
        else:
            print('No')
    else:
        print('Yes') c>d c d if (re.search(r'\.{3,}',s[b-2:d+1])):
            print('Yes')
        else:
            print('No')
     re.search(r'\.{3,}',s[b-2:d+1]) re.search re search r'\.{3,}' s[b-2:d+1] s b-2:d+1 b-2 b 2 d+1 d 1 print('Yes') print 'Yes' print('No') print 'No' print('Yes') print 'Yes' n,a,b,c,d = map(int,input().split()) map(int,input().split()) n s = input() input() s b,c,d = map(int,input().split()) map(int,input().split()) b c,d = map(int,input().split()) map(int,input().split()) c d = map(int,input().split()) map(int,input().split()) d a,b,c,d = map(int,input().split()) map(int,input().split()) a
import re
n,a,b,c,d = map(int,input().split())
s = input()
#a,b,c,d = map(lambda x:x-1,[a,b,c,d])

if re.search(r'##',s[a-1:max(b,d)]):
    print('No')
else:
    if c>d:
        if (re.search(r'\.{3,}',s[b-2:d+1])):
            print('Yes')
        else:
            print('No')
    else:
        print('Yes')