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

a_road = s[(a+1)..(c+1)]
b_road = s[(b+1)..(d+1)]

if c > d && !b_road.include?('...')
  puts 'No'
  exit
end

if a_road.include?('##') || b_road.include?('##')
  puts 'No'
else
  puts 'Yes'
end
