N,A,B,C,D=map(int,input().split())
S=input()
for i in range(B-1,D-1):
  if S[i:i+2]=='##':
    print('No')
    exit() 
for i in range(A-1,C-1):
  if S[i:i+2]=='##':
    print('No')
    exit()
if C>D:
  for i in range(B-2,D-1):
    if S[i:i+3]=='...':
      print('Yes')
      exit()
  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 for i in range(B-1,D-1):
  if S[i:i+2]=='##':
    print('No')
    exit()  i range(B-1,D-1) range B-1 B 1 D-1 D 1 if S[i:i+2]=='##':
    print('No')
    exit()  S[i:i+2]=='##' S[i:i+2] S i:i+2 i i+2 i 2 '##' print('No') print 'No' exit() exit for i in range(A-1,C-1):
  if S[i:i+2]=='##':
    print('No')
    exit() i range(A-1,C-1) range A-1 A 1 C-1 C 1 if S[i:i+2]=='##':
    print('No')
    exit() S[i:i+2]=='##' S[i:i+2] S i:i+2 i i+2 i 2 '##' print('No') print 'No' exit() exit if C>D:
  for i in range(B-2,D-1):
    if S[i:i+3]=='...':
      print('Yes')
      exit()
  print('No')
  exit() C>D C D for i in range(B-2,D-1):
    if S[i:i+3]=='...':
      print('Yes')
      exit()
   i range(B-2,D-1) range B-2 B 2 D-1 D 1 if S[i:i+3]=='...':
      print('Yes')
      exit()
   S[i:i+3]=='...' S[i:i+3] S i:i+3 i i+3 i 3 '...' print('Yes') print 'Yes' exit() exit print('No') print 'No' exit() exit print('Yes') print 'Yes' D=map(int,input().split()) map(int,input().split()) D 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 B,C,D=map(int,input().split()) map(int,input().split()) B 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())
S=input()
for i in range(B-1,D-1):
  if S[i:i+2]=='##':
    print('No')
    exit() 
for i in range(A-1,C-1):
  if S[i:i+2]=='##':
    print('No')
    exit()
if C>D:
  for i in range(B-2,D-1):
    if S[i:i+3]=='...':
      print('Yes')
      exit()
  print('No')
  exit()
print('Yes')