import sys
from collections import defaultdict
#n=int(input())
n,a,b,c,d=map(int,input().split())
#a=[int(i) for i in input().split()]
s='_'+input()

ans=['Yes','No']

#print(s,n,a,b,c,d)

def CanGo(x,y):
    cnt=0
    root=s[x:y]
    for c in root:
        if c=='#':
            cnt+=1
        elif c=='.':
            if cnt>2:
                return False
            cnt=0
    return True


def CanPass(x,y):  #(b,d)
    root=s[x-1:y+2]
    '''
    q=s[x-1:x+2]
    print(root,q)
    print(root,len(root)-3+1)
    for i in range(len(root)-3+1):
        if q=='...':
            return True
        q=q[1:3]+s[x+3+i]
    '''
    if root.find('...')!=-1:
        return True
    return False
        


if c<d:
    if CanGo(b,d) and CanGo(a,c):
        ai=0
    else:
        ai=1
elif c>d:
    if CanGo(b,d) and CanGo(a,c) and CanPass(b,d):
        ai=0
    else:
        ai=1
    
    

print(ans[ai]) import sys sys from collections import defaultdict 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() input ans=['Yes','No'] ans ['Yes','No'] 'Yes' 'No' def CanGo(x,y):
    cnt=0
    root=s[x:y]
    for c in root:
        if c=='#':
            cnt+=1
        elif c=='.':
            if cnt>2:
                return False
            cnt=0
    return True CanGo cnt=0 cnt 0 root=s[x:y] root s[x:y] s x:y x y for c in root:
        if c=='#':
            cnt+=1
        elif c=='.':
            if cnt>2:
                return False
            cnt=0
     c root if c=='#':
            cnt+=1
        elif c=='.':
            if cnt>2:
                return False
            cnt=0
     c=='#' c '#' cnt+=1 cnt 1 elif c=='.':
            if cnt>2:
                return False
            cnt=0
     c=='.' c '.' if cnt>2:
                return False
             cnt>2 cnt 2 return False False cnt=0 cnt 0 return True True x x y y def CanPass(x,y):  #(b,d)
    root=s[x-1:y+2]
    '''
    q=s[x-1:x+2]
    print(root,q)
    print(root,len(root)-3+1)
    for i in range(len(root)-3+1):
        if q=='...':
            return True
        q=q[1:3]+s[x+3+i]
    '''
    if root.find('...')!=-1:
        return True
    return False
         CanPass root=s[x-1:y+2] root s[x-1:y+2] s x-1:y+2 x-1 x 1 y+2 y 2 '''
    q=s[x-1:x+2]
    print(root,q)
    print(root,len(root)-3+1)
    for i in range(len(root)-3+1):
        if q=='...':
            return True
        q=q[1:3]+s[x+3+i]
    ''' if root.find('...')!=-1:
        return True
     root.find('...')!=-1 root.find('...') root.find root find '...' -1 return True True return False False x x y y if c<d:
    if CanGo(b,d) and CanGo(a,c):
        ai=0
    else:
        ai=1
elif c>d:
    if CanGo(b,d) and CanGo(a,c) and CanPass(b,d):
        ai=0
    else:
        ai=1
    
     c<d c d if CanGo(b,d) and CanGo(a,c):
        ai=0
    else:
        ai=1 CanGo(b,d) and CanGo(a,c) CanGo(b,d) CanGo b d CanGo(a,c) CanGo a c ai=0 ai 0 ai=1 ai 1 elif c>d:
    if CanGo(b,d) and CanGo(a,c) and CanPass(b,d):
        ai=0
    else:
        ai=1
    
     c>d c d if CanGo(b,d) and CanGo(a,c) and CanPass(b,d):
        ai=0
    else:
        ai=1
    
     CanGo(b,d) and CanGo(a,c) and CanPass(b,d) CanGo(b,d) and CanGo(a,c) CanGo(b,d) CanGo b d CanGo(a,c) CanGo a c CanPass(b,d) CanPass b d ai=0 ai 0 ai=1 ai 1 print(ans[ai]) print ans[ai] ans ai n,a,b,c,d=map(int,input().split()) map(int,input().split()) n b,c,d=map(int,input().split()) map(int,input().split()) b s='_'+input() '_'+input() s ai=1 1 ai def CanPass(x,y):  #(b,d)
    root=s[x-1:y+2]
    '''
    q=s[x-1:x+2]
    print(root,q)
    print(root,len(root)-3+1)
    for i in range(len(root)-3+1):
        if q=='...':
            return True
        q=q[1:3]+s[x+3+i]
    '''
    if root.find('...')!=-1:
        return True
    return False
         def CanPass(x,y):  #(b,d)
    root=s[x-1:y+2]
    '''
    q=s[x-1:x+2]
    print(root,q)
    print(root,len(root)-3+1)
    for i in range(len(root)-3+1):
        if q=='...':
            return True
        q=q[1:3]+s[x+3+i]
    '''
    if root.find('...')!=-1:
        return True
    return False
         CanPass ai=0 0 ai d=map(int,input().split()) map(int,input().split()) d ai=0 0 ai c,d=map(int,input().split()) map(int,input().split()) c ans=['Yes','No'] ['Yes','No'] ans def CanGo(x,y):
    cnt=0
    root=s[x:y]
    for c in root:
        if c=='#':
            cnt+=1
        elif c=='.':
            if cnt>2:
                return False
            cnt=0
    return True def CanGo(x,y):
    cnt=0
    root=s[x:y]
    for c in root:
        if c=='#':
            cnt+=1
        elif c=='.':
            if cnt>2:
                return False
            cnt=0
    return True CanGo a,b,c,d=map(int,input().split()) map(int,input().split()) a ai=1 1 ai
import sys
from collections import defaultdict
#n=int(input())
n,a,b,c,d=map(int,input().split())
#a=[int(i) for i in input().split()]
s='_'+input()

ans=['Yes','No']

#print(s,n,a,b,c,d)

def CanGo(x,y):
    cnt=0
    root=s[x:y]
    for c in root:
        if c=='#':
            cnt+=1
        elif c=='.':
            if cnt>2:
                return False
            cnt=0
    return True


def CanPass(x,y):  #(b,d)
    root=s[x-1:y+2]
    '''
    q=s[x-1:x+2]
    print(root,q)
    print(root,len(root)-3+1)
    for i in range(len(root)-3+1):
        if q=='...':
            return True
        q=q[1:3]+s[x+3+i]
    '''
    if root.find('...')!=-1:
        return True
    return False
        


if c<d:
    if CanGo(b,d) and CanGo(a,c):
        ai=0
    else:
        ai=1
elif c>d:
    if CanGo(b,d) and CanGo(a,c) and CanPass(b,d):
        ai=0
    else:
        ai=1
    
    

print(ans[ai])
