n,a,b,c,d = map(int,input().split())
s = input()

ans = 'Yes'
if '##' in s[a-1:c]:
  ans = 'No'  
if '##' in s[b-1:d]:
  ans = 'No'
  
if c > d:
  if '...' not in s[b-2:d+1]:
    ans = 'No'

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

ans = 'Yes'
if '##' in s[a-1:c]:
  ans = 'No'  
if '##' in s[b-1:d]:
  ans = 'No'
  
if c > d:
  if '...' not in s[b-2:d+1]:
    ans = 'No'

print(ans)    