local n,a,b,c,d=io.read("*n","*n","*n","*n","*n","*l")
local s=io.read()

if c<d then
    local flag=true
    for i=a,c-1 do
        if s:sub(i,i+1)=="##" then
            flag=false
        end
    end
    for i=b,d-1 do
        if s:sub(i,i+1)=="##" then
            flag=false
        end
    end
    print(flag and "Yes" or "No")
elseif c>d then
    local flag=true
    for i=a,c-1 do
        if s:sub(i,i+1)=="##" then
            flag=false
        end
    end
    for i=b,d-1 do
        if s:sub(i,i+1)=="##" then
            flag=false
        end
    end
    if flag then
        flag=false
        for i=b-1,d-1 do
            if s:sub(i,i+2)=="..." then
                flag=true
            end
        end
        print(flag and "Yes" or "No")
    end
end