import sys
def input(): return sys.stdin.readline().strip()
def mapint(): return map(int, input().split())
sys.setrecursionlimit(10**9)

N, A, B, C, D = mapint()
S = list(input())

def exp(idx, goal):
    while 1:
        if idx==goal:
            return True
        if idx+1<N and S[idx+1]==".":
            idx += 1
        elif idx+2<N and S[idx+2]=='.':
            idx += 2
        else:
            return False

if C<D:
    if exp(A-1, C-1) and exp(B-1, D-1):
        print('Yes')
    else:
        print('No')
else:
    for i in range(B-2, min(N-2, D-1)):
        if S[i]=="." and S[i+1]=="." and S[i+2]==".":
            if exp(A-1, C-1) and exp(B-1, D-1):
                print('Yes')
            else:
                print('No')
            break
    else:
        print('No') import sys sys def input(): return sys.stdin.readline().strip() input def mapint(): return map(int, input().split()) mapint sys.setrecursionlimit(10**9) sys.setrecursionlimit sys setrecursionlimit 10**9 10 9 N, A, B, C, D = mapint() N mapint() mapint A B C D S = list(input()) S list(input()) list input() input def exp(idx, goal):
    while 1:
        if idx==goal:
            return True
        if idx+1<N and S[idx+1]==".":
            idx += 1
        elif idx+2<N and S[idx+2]=='.':
            idx += 2
        else:
            return False exp while 1:
        if idx==goal:
            return True
        if idx+1<N and S[idx+1]==".":
            idx += 1
        elif idx+2<N and S[idx+2]=='.':
            idx += 2
        else:
            return False 1 if idx==goal:
            return True
         idx==goal idx goal return True True if idx+1<N and S[idx+1]==".":
            idx += 1
        elif idx+2<N and S[idx+2]=='.':
            idx += 2
        else:
            return False idx+1<N and S[idx+1]=="." idx+1<N idx+1 idx 1 N S[idx+1]=="." S[idx+1] S idx+1 idx 1 "." idx += 1 idx 1 elif idx+2<N and S[idx+2]=='.':
            idx += 2
         idx+2<N and S[idx+2]=='.' idx+2<N idx+2 idx 2 N S[idx+2]=='.' S[idx+2] S idx+2 idx 2 '.' idx += 2 idx 2 return False False idx idx goal goal if C<D:
    if exp(A-1, C-1) and exp(B-1, D-1):
        print('Yes')
    else:
        print('No')
else:
    for i in range(B-2, min(N-2, D-1)):
        if S[i]=="." and S[i+1]=="." and S[i+2]==".":
            if exp(A-1, C-1) and exp(B-1, D-1):
                print('Yes')
            else:
                print('No')
            break
    else:
        print('No') C<D C D if exp(A-1, C-1) and exp(B-1, D-1):
        print('Yes')
    else:
        print('No') exp(A-1, C-1) and exp(B-1, D-1) exp(A-1, C-1) exp A-1 A 1 C-1 C 1 exp(B-1, D-1) exp B-1 B 1 D-1 D 1 print('Yes') print 'Yes' print('No') print 'No' for i in range(B-2, min(N-2, D-1)):
        if S[i]=="." and S[i+1]=="." and S[i+2]==".":
            if exp(A-1, C-1) and exp(B-1, D-1):
                print('Yes')
            else:
                print('No')
            break
    else:
        print('No') i range(B-2, min(N-2, D-1)) range B-2 B 2 min(N-2, D-1) min N-2 N 2 D-1 D 1 if S[i]=="." and S[i+1]=="." and S[i+2]==".":
            if exp(A-1, C-1) and exp(B-1, D-1):
                print('Yes')
            else:
                print('No')
            break
     S[i]=="." and S[i+1]=="." and S[i+2]=="." S[i]=="." and S[i+1]=="." S[i]=="." S[i] S i "." S[i+1]=="." S[i+1] S i+1 i 1 "." S[i+2]=="." S[i+2] S i+2 i 2 "." if exp(A-1, C-1) and exp(B-1, D-1):
                print('Yes')
            else:
                print('No')
             exp(A-1, C-1) and exp(B-1, D-1) exp(A-1, C-1) exp A-1 A 1 C-1 C 1 exp(B-1, D-1) exp B-1 B 1 D-1 D 1 print('Yes') print 'Yes' print('No') print 'No' break print('No') print 'No' N, A, B, C, D = mapint() mapint() N def mapint(): return map(int, input().split()) def mapint(): return map(int, input().split()) mapint D = mapint() mapint() D B, C, D = mapint() mapint() B C, D = mapint() mapint() C S = list(input()) list(input()) S A, B, C, D = mapint() mapint() A def exp(idx, goal):
    while 1:
        if idx==goal:
            return True
        if idx+1<N and S[idx+1]==".":
            idx += 1
        elif idx+2<N and S[idx+2]=='.':
            idx += 2
        else:
            return False def exp(idx, goal):
    while 1:
        if idx==goal:
            return True
        if idx+1<N and S[idx+1]==".":
            idx += 1
        elif idx+2<N and S[idx+2]=='.':
            idx += 2
        else:
            return False exp def input(): return sys.stdin.readline().strip() def input(): return sys.stdin.readline().strip() input
import sys
def input(): return sys.stdin.readline().strip()
def mapint(): return map(int, input().split())
sys.setrecursionlimit(10**9)

N, A, B, C, D = mapint()
S = list(input())

def exp(idx, goal):
    while 1:
        if idx==goal:
            return True
        if idx+1<N and S[idx+1]==".":
            idx += 1
        elif idx+2<N and S[idx+2]=='.':
            idx += 2
        else:
            return False

if C<D:
    if exp(A-1, C-1) and exp(B-1, D-1):
        print('Yes')
    else:
        print('No')
else:
    for i in range(B-2, min(N-2, D-1)):
        if S[i]=="." and S[i+1]=="." and S[i+2]==".":
            if exp(A-1, C-1) and exp(B-1, D-1):
                print('Yes')
            else:
                print('No')
            break
    else:
        print('No')