n,a,b,c,d = map(int,input().split())
s = input()
a,b,c,d = a-1,b-1,c-1,d-1

def move(a,s):
    ar = a
    while(ar<n-2):
        if(s[ar+2]=='.'):
            ar += 2
        elif(s[ar+1]=='.'):
            ar +=1
        else:
            break
    if(ar!=n-1):
        ar+=(s[ar+1]=='.')
    return ar

def pr_end(x):
    if(x):
        print('Yes')
    else:
        print('No')
    exit()

ar = move(a,s)
br = move(b,s)

if(c<d):
    if(c<=ar)&(d<=br):
        pr_end(1)
    else:
        pr_end(0)

for i in range(b-1,d):
    if(s[i:i+3] =='...'):
        if(c<=ar)&(d<=br):
            pr_end(1)
        else:
            pr_end(0)

pr_end(0) 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 a,b,c,d = a-1,b-1,c-1,d-1 a a-1 a 1 b b-1 b 1 c c-1 c 1 d d-1 d 1 def move(a,s):
    ar = a
    while(ar<n-2):
        if(s[ar+2]=='.'):
            ar += 2
        elif(s[ar+1]=='.'):
            ar +=1
        else:
            break
    if(ar!=n-1):
        ar+=(s[ar+1]=='.')
    return ar move ar = a ar a while(ar<n-2):
        if(s[ar+2]=='.'):
            ar += 2
        elif(s[ar+1]=='.'):
            ar +=1
        else:
            break
     ar<n-2 ar n-2 n 2 if(s[ar+2]=='.'):
            ar += 2
        elif(s[ar+1]=='.'):
            ar +=1
        else:
            break
     s[ar+2]=='.' s[ar+2] s ar+2 ar 2 '.' ar += 2 ar 2 elif(s[ar+1]=='.'):
            ar +=1
         s[ar+1]=='.' s[ar+1] s ar+1 ar 1 '.' ar +=1 ar 1 break if(ar!=n-1):
        ar+=(s[ar+1]=='.')
     ar!=n-1 ar n-1 n 1 ar+=(s[ar+1]=='.') ar s[ar+1]=='.' s[ar+1] s ar+1 ar 1 '.' return ar ar a a s s def pr_end(x):
    if(x):
        print('Yes')
    else:
        print('No')
    exit() pr_end if(x):
        print('Yes')
    else:
        print('No')
     x print('Yes') print 'Yes' print('No') print 'No' exit() exit x x ar = move(a,s) ar move(a,s) move a s br = move(b,s) br move(b,s) move b s if(c<d):
    if(c<=ar)&(d<=br):
        pr_end(1)
    else:
        pr_end(0) c<d c d if(c<=ar)&(d<=br):
        pr_end(1)
    else:
        pr_end(0) (c<=ar)&(d<=br) c<=ar c ar d<=br d br pr_end(1) pr_end 1 pr_end(0) pr_end 0 for i in range(b-1,d):
    if(s[i:i+3] =='...'):
        if(c<=ar)&(d<=br):
            pr_end(1)
        else:
            pr_end(0) i range(b-1,d) range b-1 b 1 d if(s[i:i+3] =='...'):
        if(c<=ar)&(d<=br):
            pr_end(1)
        else:
            pr_end(0) s[i:i+3] =='...' s[i:i+3] s i:i+3 i i+3 i 3 '...' if(c<=ar)&(d<=br):
            pr_end(1)
        else:
            pr_end(0) (c<=ar)&(d<=br) c<=ar c ar d<=br d br pr_end(1) pr_end 1 pr_end(0) pr_end 0 pr_end(0) pr_end 0 d = a-1,b-1,c-1,d-1 d-1 d c,d = a-1,b-1,c-1,d-1 c-1 c d = map(int,input().split()) map(int,input().split()) d 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 a,b,c,d = a-1,b-1,c-1,d-1 a-1 a br = move(b,s) move(b,s) br def move(a,s):
    ar = a
    while(ar<n-2):
        if(s[ar+2]=='.'):
            ar += 2
        elif(s[ar+1]=='.'):
            ar +=1
        else:
            break
    if(ar!=n-1):
        ar+=(s[ar+1]=='.')
    return ar def move(a,s):
    ar = a
    while(ar<n-2):
        if(s[ar+2]=='.'):
            ar += 2
        elif(s[ar+1]=='.'):
            ar +=1
        else:
            break
    if(ar!=n-1):
        ar+=(s[ar+1]=='.')
    return ar move c,d = map(int,input().split()) map(int,input().split()) c b,c,d = a-1,b-1,c-1,d-1 b-1 b a,b,c,d = map(int,input().split()) map(int,input().split()) a def pr_end(x):
    if(x):
        print('Yes')
    else:
        print('No')
    exit() def pr_end(x):
    if(x):
        print('Yes')
    else:
        print('No')
    exit() pr_end s = input() input() s ar = move(a,s) move(a,s) ar
n,a,b,c,d = map(int,input().split())
s = input()
a,b,c,d = a-1,b-1,c-1,d-1

def move(a,s):
    ar = a
    while(ar<n-2):
        if(s[ar+2]=='.'):
            ar += 2
        elif(s[ar+1]=='.'):
            ar +=1
        else:
            break
    if(ar!=n-1):
        ar+=(s[ar+1]=='.')
    return ar

def pr_end(x):
    if(x):
        print('Yes')
    else:
        print('No')
    exit()

ar = move(a,s)
br = move(b,s)

if(c<d):
    if(c<=ar)&(d<=br):
        pr_end(1)
    else:
        pr_end(0)

for i in range(b-1,d):
    if(s[i:i+3] =='...'):
        if(c<=ar)&(d<=br):
            pr_end(1)
        else:
            pr_end(0)

pr_end(0)