n, a, b, c, d = gets.strip.split.map(&:to_i)
s = gets.strip.split("")
s.insert(0,"0")

if s[a,c].join.match(/.*##.*/)
  puts "No"
  exit
end
if s[b,d].join.match(/.*##.*/)
  puts "No"
  exit
end

if c < d
  puts "Yes"
else
  if s[b-1,d+1].join.match(/.*\.\.\..*/)
    puts "Yes"
  else
    puts "No"
  end
end

