n,a,b,c,d=map(int,input().split())
s=input()
# a->c, b->d
# a<b
if c>d:
  if '...' in s[b-2:d+1]:
    if '##' in s[a:c]:
      print('No')
      exit()
  else:
    print('No')
    exit()

else:
  if '##' in s[a:c]:
    print('No')
    exit()
  if '##' in s[b:d]:
    print('No')
    exit()
print('Yes')
 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:
  if '...' in s[b-2:d+1]:
    if '##' in s[a:c]:
      print('No')
      exit()
  else:
    print('No')
    exit()

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

else:
  if '##' in s[a:c]:
    print('No')
    exit()
  if '##' in s[b:d]:
    print('No')
    exit()
print('Yes')

