import sys, math
from functools import lru_cache
from itertools import accumulate
sys.setrecursionlimit(10**9)
MOD = 10**9+7

def input():
    return sys.stdin.readline()[:-1]

def mi():
    return map(int, input().split())

def ii():
    return int(input())

def i2(n):
    tmp = [list(mi()) for i in range(n)]
    return [list(i) for i in zip(*tmp)]

N, A, B, C, D = mi()
S = input()
f = (not '##' in S[A-1:C]) and (not '##' in S[B-1:D])
if C > D:
    f = f and ('...' in S[B-2:D+1])

print('Yes' if f else 'No') import sys, math sys math from functools import lru_cache from itertools import accumulate sys.setrecursionlimit(10**9) sys.setrecursionlimit sys setrecursionlimit 10**9 10 9 MOD = 10**9+7 MOD 10**9+7 10**9 10 9 7 def input():
    return sys.stdin.readline()[:-1] input return sys.stdin.readline()[:-1] sys.stdin.readline()[:-1] sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline :-1 -1 def mi():
    return map(int, input().split()) mi return map(int, input().split()) map(int, input().split()) map int input().split() ().split () input split def ii():
    return int(input()) ii return int(input()) int(input()) int input() input def i2(n):
    tmp = [list(mi()) for i in range(n)]
    return [list(i) for i in zip(*tmp)] i2 list(mi()) for i in range(n) for i in range(n) i range(n) range n for i in range(n) list(mi()) list mi() mi tmp = [list(mi()) for i in range(n)] tmp [list(mi()) for i in range(n)] list(i) for i in zip(*tmp) for i in zip(*tmp) i zip(*tmp) zip *tmp tmp for i in zip(*tmp) list(i) list i return [list(i) for i in zip(*tmp)] [list(i) for i in zip(*tmp)] n n N, A, B, C, D = mi() N mi() mi A B C D S = input() S input() input f = (not '##' in S[A-1:C]) and (not '##' in S[B-1:D]) f (not '##' in S[A-1:C]) and (not '##' in S[B-1:D]) not '##' in S[A-1:C] '##' in S[A-1:C] '##' S[A-1:C] S A-1:C A-1 A 1 C not '##' in S[B-1:D] '##' in S[B-1:D] '##' S[B-1:D] S B-1:D B-1 B 1 D if C > D:
    f = f and ('...' in S[B-2:D+1]) C > D C D f = f and ('...' in S[B-2:D+1]) f f and ('...' in S[B-2:D+1]) f '...' in S[B-2:D+1] '...' S[B-2:D+1] S B-2:D+1 B-2 B 2 D+1 D 1 print('Yes' if f else 'No') print 'Yes' if f else 'No' f 'Yes' 'No' D = mi() mi() D def input():
    return sys.stdin.readline()[:-1] def input():
    return sys.stdin.readline()[:-1] input def mi():
    return map(int, input().split()) def mi():
    return map(int, input().split()) mi f = (not '##' in S[A-1:C]) and (not '##' in S[B-1:D]) (not '##' in S[A-1:C]) and (not '##' in S[B-1:D]) f def i2(n):
    tmp = [list(mi()) for i in range(n)]
    return [list(i) for i in zip(*tmp)] def i2(n):
    tmp = [list(mi()) for i in range(n)]
    return [list(i) for i in zip(*tmp)] i2 S = input() input() S A, B, C, D = mi() mi() A N, A, B, C, D = mi() mi() N MOD = 10**9+7 10**9+7 MOD def ii():
    return int(input()) def ii():
    return int(input()) ii B, C, D = mi() mi() B C, D = mi() mi() C f = f and ('...' in S[B-2:D+1]) f and ('...' in S[B-2:D+1]) f
import sys, math
from functools import lru_cache
from itertools import accumulate
sys.setrecursionlimit(10**9)
MOD = 10**9+7

def input():
    return sys.stdin.readline()[:-1]

def mi():
    return map(int, input().split())

def ii():
    return int(input())

def i2(n):
    tmp = [list(mi()) for i in range(n)]
    return [list(i) for i in zip(*tmp)]

N, A, B, C, D = mi()
S = input()
f = (not '##' in S[A-1:C]) and (not '##' in S[B-1:D])
if C > D:
    f = f and ('...' in S[B-2:D+1])

print('Yes' if f else 'No')
