local n,a,b,c,d=io.read("*n","*n","*n","*n","*n","*l")
local s=io.read()
if #s:sub(a,c):match("#+")>1 or #s:sub(b,d):match("#+")>1 or s:sub(c-1,c-1)=="#" or s:sub(c+1,c+1)=="#" or s:sub(d-1,d-1)=="#" or s:sub(d+1,d+1)=="#" then
    print("No")
else
    print("Yes")
end