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

if (b...d).any? {|i| s[i..i + 1] == "##" }
  puts "No"
elsif c < d
  puts "Yes"
else
  puts ((b..d).any? {|i| s[i - 1..i + 1] == "..." })? "Yes" : "No"
end