n, a, b, c, d = gets.split.map(&:to_i)
s = gets.strip
over = false
for i in (b - 1)...d
  if s[i] == '#' && s[i + 1] == '#'
    puts 'No'
    exit
  end

  over = true if s[i] == '.' && s[i + 1] == '.' && s[i - 1] == '.'
end

if d < c
  if !over
    puts 'No'
    exit
  end
end

for i in (a - 1)...c
  if s[i] == '#' && s[i + 1] == '#'
    puts 'No'
    exit
  end
end

puts 'Yes'

