local n = io.read("*n")
local a = io.read("*n")
local b = io.read("*n")
local c = io.read("*n")
local d = io.read("*n")
io.read("*l")
local s = io.read("*l")
local empty = string.byte(".", 1)
local rock = string.byte("#", 1)
if a > b then
	a, b = b, a
	c, d = d, c
end
local threeempty = false
for i = 1, math.max(c, d) do 
	if a < i and i < c and string.byte(s, i) == rock and string.byte(s, i + 1) == rock then
		print("No")
		return
	end
	if b < i and i < d and string.byte(s, i) == rock and string.byte(s, i + 1) == rock then
		print("No")
	end
	if b <= i and i <= d and i + 2 <= n and string.byte(s, i) == empty and string.byte(s, i + 1) == empty and string.byte(s, i + 2) == empty then
		threeempty = true
	end
end

if d < c then
	if not threeempty then
		print('No')
		return
	end
end
print("Yes")