
from re import search
def myAnswer(N:int,A:int,B:int,C:int,D:int,S:str) -> str:
   if (search(r'##',S[A-1:max(C,D)])): return "No"
   if(C > D):
      return "Yes" if (search(r'\.\.\.',S[B - 2:D+1])) else "No"
   return "Yes"

def modelAnswer():
   return
def main():
   N,A,B,C,D = map(int,input().split())
   S = input()
   print(myAnswer(N,A,B,C,D,S))
if __name__ == '__main__':
   main() from re import search def myAnswer(N:int,A:int,B:int,C:int,D:int,S:str) -> str:
   if (search(r'##',S[A-1:max(C,D)])): return "No"
   if(C > D):
      return "Yes" if (search(r'\.\.\.',S[B - 2:D+1])) else "No"
   return "Yes" myAnswer if (search(r'##',S[A-1:max(C,D)])): return "No"
    search(r'##',S[A-1:max(C,D)]) search r'##' S[A-1:max(C,D)] S A-1:max(C,D) A-1 A 1 max(C,D) max C D if(C > D):
      return "Yes" if (search(r'\.\.\.',S[B - 2:D+1])) else "No"
    C > D C D return "Yes" if (search(r'\.\.\.',S[B - 2:D+1])) else "No" "Yes" if (search(r'\.\.\.',S[B - 2:D+1])) else "No" search(r'\.\.\.',S[B - 2:D+1]) search r'\.\.\.' S[B - 2:D+1] S B - 2:D+1 B - 2 B 2 D+1 D 1 "Yes" "No" return "Yes" "Yes" N:int N A:int A B:int B C:int C D:int D S:str S def modelAnswer():
   return modelAnswer return def main():
   N,A,B,C,D = map(int,input().split())
   S = input()
   print(myAnswer(N,A,B,C,D,S)) main 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 print(myAnswer(N,A,B,C,D,S)) print myAnswer(N,A,B,C,D,S) myAnswer N A B C D S if __name__ == '__main__':
   main() __name__ == '__main__' __name__ '__main__' main() main def modelAnswer():
   return def modelAnswer():
   return modelAnswer def main():
   N,A,B,C,D = map(int,input().split())
   S = input()
   print(myAnswer(N,A,B,C,D,S)) def main():
   N,A,B,C,D = map(int,input().split())
   S = input()
   print(myAnswer(N,A,B,C,D,S)) main def myAnswer(N:int,A:int,B:int,C:int,D:int,S:str) -> str:
   if (search(r'##',S[A-1:max(C,D)])): return "No"
   if(C > D):
      return "Yes" if (search(r'\.\.\.',S[B - 2:D+1])) else "No"
   return "Yes" def myAnswer(N:int,A:int,B:int,C:int,D:int,S:str) -> str:
   if (search(r'##',S[A-1:max(C,D)])): return "No"
   if(C > D):
      return "Yes" if (search(r'\.\.\.',S[B - 2:D+1])) else "No"
   return "Yes" myAnswer

from re import search
def myAnswer(N:int,A:int,B:int,C:int,D:int,S:str) -> str:
   if (search(r'##',S[A-1:max(C,D)])): return "No"
   if(C > D):
      return "Yes" if (search(r'\.\.\.',S[B - 2:D+1])) else "No"
   return "Yes"

def modelAnswer():
   return
def main():
   N,A,B,C,D = map(int,input().split())
   S = input()
   print(myAnswer(N,A,B,C,D,S))
if __name__ == '__main__':
   main()