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

if c > d
	s.slice!(c..(s.length-1))
elsif d > c
	s.slice!(d..(s.length-1))
end

if a > 1
	s.slice!(0..(a-1-1))
end

if s.include?('##')
	puts 'No'
	exit
end

if a < c && c < b
	puts 'Yes'
	exit
end

if c < d
	puts 'Yes'
	exit
end

s.slice!(0..(b-a-1))

if s.include?('...')
	puts 'Yes'
else
	puts 'No'
end
