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

rocks = 0
areas = Array.new(n+1, 0)
for i in 0..(n-1)
  if s[i] == "."
    areas[i+1] = areas[i] + 1
    rocks = 0
  elsif s[i] == "#"
    areas[i+1] = 0
    if i >= a - 1 && i <= ([c, d].max - 1)
      rocks += 1
    end
  end
  if rocks >= 2
    break
  end
end
if rocks >= 2
  puts "No"
else
  if c < d
    puts "Yes"
  else
    ifover = 0
    for i in (b+1)..(d+1)
      if areas[i] >= 3
        ifover = 1
        break
      end
    end
    if ifover > 0
      puts "Yes"
    else
      puts "No"
    end
  end
end