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

if s[a..c].include?'##' or s[b..d].include? '##'
  puts :No
elsif c < d
  puts :Yes
else
  if s[b-1..d+1].include? '...'
    puts :Yes
  else
    puts :No
  end
end
