n,a,b,c,d=gets.chomp.split(" ").map{|s| s.to_i}
s=gets.chomp.split("")

if c<d
  max=0
  cou=0
  for i in a-1..d-1
    if s[i]=="#"
      cou+=1
    else
      max=cou if cou>=max
      cou=0
    end
  end

  if max<2
    puts "Yes"
  else
    puts "No"
  end

else
  max=0
  cou=0
  for i in b-1..d-1
    if s[i]=="."
      cou+=1
    else
      max=cou if cou>=max
      cou=0
    end
  end

  if max>=3
    f=true
  else
    f=false
  end

  max=0
  cou=0
  for i in a-1..d-1
    if s[i]=="#"
      cou+=1
    else
      max=cou if cou>=max
      cou=0
    end
  end

  if max<2 && f
    puts "Yes"
  else
    puts "No"
  end

end
