N,A,B,C,D=map(int,input().split())
str=input()

str_ac = str[A-1:C]
str_bd = str[B-1:D]
str_bd2 = str[B-2:D+1]
#print(str_bd)
#print(str_ac)
#print(str_bd2)

if C<D:
  if str_bd.find("##")!=-1 or str_ac.find("##")!=-1:
    print("No")
  else:
    print("Yes")
else:
  if str_bd.find("##")!=-1 or str_ac.find("##")!=-1:
    print("No")
  else:
    if str_bd2.find("...")!=-1:
      print("Yes")
    else:
      print("No") 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 str=input() str input() input str_ac = str[A-1:C] str_ac str[A-1:C] str A-1:C A-1 A 1 C str_bd = str[B-1:D] str_bd str[B-1:D] str B-1:D B-1 B 1 D str_bd2 = str[B-2:D+1] str_bd2 str[B-2:D+1] str B-2:D+1 B-2 B 2 D+1 D 1 if C<D:
  if str_bd.find("##")!=-1 or str_ac.find("##")!=-1:
    print("No")
  else:
    print("Yes")
else:
  if str_bd.find("##")!=-1 or str_ac.find("##")!=-1:
    print("No")
  else:
    if str_bd2.find("...")!=-1:
      print("Yes")
    else:
      print("No") C<D C D if str_bd.find("##")!=-1 or str_ac.find("##")!=-1:
    print("No")
  else:
    print("Yes") str_bd.find("##")!=-1 or str_ac.find("##")!=-1 str_bd.find("##")!=-1 str_bd.find("##") str_bd.find str_bd find "##" -1 str_ac.find("##")!=-1 str_ac.find("##") str_ac.find str_ac find "##" -1 print("No") print "No" print("Yes") print "Yes" if str_bd.find("##")!=-1 or str_ac.find("##")!=-1:
    print("No")
  else:
    if str_bd2.find("...")!=-1:
      print("Yes")
    else:
      print("No") str_bd.find("##")!=-1 or str_ac.find("##")!=-1 str_bd.find("##")!=-1 str_bd.find("##") str_bd.find str_bd find "##" -1 str_ac.find("##")!=-1 str_ac.find("##") str_ac.find str_ac find "##" -1 print("No") print "No" if str_bd2.find("...")!=-1:
      print("Yes")
    else:
      print("No") str_bd2.find("...")!=-1 str_bd2.find("...") str_bd2.find str_bd2 find "..." -1 print("Yes") print "Yes" print("No") print "No" D=map(int,input().split()) map(int,input().split()) D str_ac = str[A-1:C] str[A-1:C] str_ac str_bd2 = str[B-2:D+1] str[B-2:D+1] str_bd2 str=input() input() str A,B,C,D=map(int,input().split()) map(int,input().split()) A str_bd = str[B-1:D] str[B-1:D] str_bd 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
N,A,B,C,D=map(int,input().split())
str=input()

str_ac = str[A-1:C]
str_bd = str[B-1:D]
str_bd2 = str[B-2:D+1]
#print(str_bd)
#print(str_ac)
#print(str_bd2)

if C<D:
  if str_bd.find("##")!=-1 or str_ac.find("##")!=-1:
    print("No")
  else:
    print("Yes")
else:
  if str_bd.find("##")!=-1 or str_ac.find("##")!=-1:
    print("No")
  else:
    if str_bd2.find("...")!=-1:
      print("Yes")
    else:
      print("No")