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

s = " " + s

# 岩が連続しているかチェック
a.upto([c, d].max) {|i|
	if s[i] == "#" && s[i + 1] == "#"
		puts "No"
		exit
	end
}

if c < d
	puts "Yes"
else
	result = false
	(b - 1).upto(d - 1) {|i|
		result = true if s[i] == "." && s[i + 1] == "." && s[i + 2] == "."
	}
	puts (result ? "Yes" : "No")
end
