N ,A ,B ,C ,D = list(map(int,input().split()))
S = input()
 
def judgeArrive(S, x , y):
  flag = "Yes"
  for i in range(x-1 ,y-1):
    if S[i:i+2] == "##":
        flag = "No"
  return flag
        
def judgeJumpOver(S, x , y):
  flag = "No"
  for i in range(x-1 ,y):
    if S[i-1:i+2] == "...":
      flag = "Yes"
      break
 
  return flag
 
result = "Yes"
if(C > D):
  result = judgeJumpOver(S, B, D)
if(result == "Yes"):
  result = judgeArrive(S, B, D)
if(result == "Yes"):
  result = judgeArrive(S, A, C)
print(result)
