_, a, b, c, d = gets.split.map(&:to_i)
s = gets.chomp
if c < d
  if /##/ === s[a - 1..d - 1]
    puts 'No'
  else
    puts 'Yes'
  end
else
  if /##/ === s[a - 1..d - 1]
    puts 'No'
  elsif /[.]{3}/ === s[b - 2..d]
    puts 'Yes'
  else
    puts 'No'
  end
end