import re
n, a, b, c, d = map(int, input().split())
road = input()
if c < d:
    if re.search('##', road[a:d]) is None:
        print('Yes')
    else:
        print('No')
 
elif c > d:
    if re.search('##', road[a:]) is None and re.search('\.\.\.', road[b-2:d+1]) is not None:
        print('Yes')
    else:
        print('No') 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 road = input() road input() input if c < d:
    if re.search('##', road[a:d]) is None:
        print('Yes')
    else:
        print('No')
 
elif c > d:
    if re.search('##', road[a:]) is None and re.search('\.\.\.', road[b-2:d+1]) is not None:
        print('Yes')
    else:
        print('No') c < d c d if re.search('##', road[a:d]) is None:
        print('Yes')
    else:
        print('No')
  re.search('##', road[a:d]) is None re.search('##', road[a:d]) re.search re search '##' road[a:d] road a:d a d None print('Yes') print 'Yes' print('No') print 'No' elif c > d:
    if re.search('##', road[a:]) is None and re.search('\.\.\.', road[b-2:d+1]) is not None:
        print('Yes')
    else:
        print('No') c > d c d if re.search('##', road[a:]) is None and re.search('\.\.\.', road[b-2:d+1]) is not None:
        print('Yes')
    else:
        print('No') re.search('##', road[a:]) is None and re.search('\.\.\.', road[b-2:d+1]) is not None re.search('##', road[a:]) is None re.search('##', road[a:]) re.search re search '##' road[a:] road a: a None re.search('\.\.\.', road[b-2:d+1]) is not None re.search('\.\.\.', road[b-2:d+1]) re.search re search '\.\.\.' road[b-2:d+1] road b-2:d+1 b-2 b 2 d+1 d 1 None print('Yes') print 'Yes' print('No') print 'No' c, d = map(int, input().split()) map(int, input().split()) c n, a, b, c, d = map(int, input().split()) map(int, input().split()) n d = map(int, input().split()) map(int, input().split()) d road = input() input() road 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
import re
n, a, b, c, d = map(int, input().split())
road = input()
if c < d:
    if re.search('##', road[a:d]) is None:
        print('Yes')
    else:
        print('No')
 
elif c > d:
    if re.search('##', road[a:]) is None and re.search('\.\.\.', road[b-2:d+1]) is not None:
        print('Yes')
    else:
        print('No')