datas = gets.split.map{|n|n.to_i}
n = datas[0]
a = datas[1]
b = datas[2]
c = datas[3]
d = datas[4]
mapstring = gets
activemap = (mapstring[(a-1)..(c-1)].include?("##") or mapstring[(b-1)..(d-1)].include?("##"))
clearflag = true
if activemap
  clearflag = false
else
  if c < d
    clearflag = true
  else
    submap = mapstring[((b-2)..(d))]
    clearflag = submap.include?("...")
  end
end


if clearflag
  puts "Yes"
else
  puts "No"
end