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 then
    print("No")
else
    if c>d then
        for i=b-1,d-1 do
            if s:sub(i,i+2)=="..." then
                print("Yes")
                return
            end
        end
        print("No")
    else
        print("Yes")
    end
end