local function str2tbl(s)
    -- limit of #s is approximately 999959
    local t = {string.byte(s, 1, #s)}
    local char = string.char
    for i=1, #t do
        if char(t[i]) == '#' then
            t[i] = 1
        else
            t[i] = 0
        end
    end
    return t
end
--
local N, A, B, C, D = io.read("n", "n", "n", "n", "n", "l")
local S = str2tbl(io.read("l"))

local function YesNo(x)
    print(x and 'Yes' or 'No')
end

local function ok1(src, dst)
    local prev = S[src]
    for i=src+1, dst do
        local cur = S[i]
        if prev == 1 and cur == 1 then
            return false
        end
        prev = cur
    end
    return true
end

local function ok2(src, dst)
    for i=src, dst do
        local prev = S[i-1]
        local cur = S[i]
        local nex = S[i+1]
        if prev == 0 and cur == 0 and nex == 0 then
            return true
        end
    end
    return false
end

local fnuke_ok = ok1(B, D)
local snuke_ok = ok1(A, C)
if C < D then
    YesNo(fnuke_ok and snuke_ok)
else
    YesNo(ok2(B, D))
end
