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

if s[a..c].scan(/##/).count > 0 || s[b..d].scan(/##/).count > 0
  puts "No"
elsif c < d
  puts "Yes"
else
  puts (s[b - 1..d + 1].scan(/\.\.\./).count > 0)? "Yes" : "No"
end