# A - Kenken Race

N,A,B,C,D = map(int,input().split())
S = input()

should_change = int(C>D)
can_change = 0
space = 1
ans = 'Yes'

for i in range(A,max(C,D)):
    if S[i]=='.':
        space += 1
        if B<=i<=D and space==3:
            can_change = 1
    else:
        if space==0:
            ans = 'No'
            break
        space = 0

if can_change<should_change:
    ans = 'No'
print(ans) N,A,B,C,D = map(int,input().split()) N map(int,input().split()) map int input().split() ().split () input split A B C D S = input() S input() input should_change = int(C>D) should_change int(C>D) int C>D C D can_change = 0 can_change 0 space = 1 space 1 ans = 'Yes' ans 'Yes' for i in range(A,max(C,D)):
    if S[i]=='.':
        space += 1
        if B<=i<=D and space==3:
            can_change = 1
    else:
        if space==0:
            ans = 'No'
            break
        space = 0 i range(A,max(C,D)) range A max(C,D) max C D if S[i]=='.':
        space += 1
        if B<=i<=D and space==3:
            can_change = 1
    else:
        if space==0:
            ans = 'No'
            break
        space = 0 S[i]=='.' S[i] S i '.' space += 1 space 1 if B<=i<=D and space==3:
            can_change = 1
     B<=i<=D and space==3 B<=i<=D B<=i B i D space==3 space 3 can_change = 1 can_change 1 if space==0:
            ans = 'No'
            break
         space==0 space 0 ans = 'No' ans 'No' break space = 0 space 0 if can_change<should_change:
    ans = 'No' can_change<should_change can_change should_change ans = 'No' ans 'No' print(ans) print ans D = map(int,input().split()) map(int,input().split()) D C,D = map(int,input().split()) map(int,input().split()) C space = 0 0 space S = input() input() S ans = 'No' 'No' ans B,C,D = map(int,input().split()) map(int,input().split()) B ans = 'Yes' 'Yes' ans space = 1 1 space can_change = 1 1 can_change space += 1 1 space N,A,B,C,D = map(int,input().split()) map(int,input().split()) N ans = 'No' 'No' ans can_change = 0 0 can_change should_change = int(C>D) int(C>D) should_change A,B,C,D = map(int,input().split()) map(int,input().split()) A
# A - Kenken Race

N,A,B,C,D = map(int,input().split())
S = input()

should_change = int(C>D)
can_change = 0
space = 1
ans = 'Yes'

for i in range(A,max(C,D)):
    if S[i]=='.':
        space += 1
        if B<=i<=D and space==3:
            can_change = 1
    else:
        if space==0:
            ans = 'No'
            break
        space = 0

if can_change<should_change:
    ans = 'No'
print(ans)