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

s = gets.chomp


if s[[a,b].min-1...[c,d].max] =~ /##/
	puts "No"
elsif (a < b && c < d) || (a > b && c > d)
	puts "Yes"
elsif s[[a,b].max-2...[c,d].min+1] =~ /\.\.\./
	puts "Yes"
else
	puts "No"
end


