import Data.Maybe
import Control.Monad
import qualified Data.ByteString.Char8 as C

readInt' = fst.fromJust.C.readInt
readLnInt = map readInt'.C.words<$>C.getLine

x ? (a,b) = if x then a else b

-- なんかだめだった

main = do
 [n,a,b,c,d] <- readLnInt
 s <- getLine
 putStr (solve a b c d s)

solve a b c d s = (j&&(c>d)?(j2,True))?("Yes","No") where
 j2 = judge2 waya
 j = judge waya && judge wayb
 waya = way a c s
 wayb = way b d s

way x y s = drop x (take y s)

judge [] = True
judge [p] = True
judge (p:q:r) = ([p,q]=="##")?(False,True) && (null r)?(True,judge (q:r))

judge2 [] = False
judge2 [p,q] = False
judge2 (p:q:r:s) = ([p,q,r] == "...")?(True,False) || (null s)?(False,judge2 (q:r:s))
