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

if c<d:
    for i in range(a-1,d-1):
        if s[i]=='#' and s[i+1]=='#':
            print('No')
            exit(0)
    print('Yes')
else:
    for i in range(b-1,d):
        if s[i-1]=='.' and s[i]=='.' and s[i+1]=='.':
            break
    else:
        print('No')
        exit(0)
    
    for i in range(a-1,c-1):
        if s[i]=='#' and s[i+1]=='#':
            print('No')
            exit(0)
    
    print('Yes') n,a,b,c,d=list(map(int,input().split())) n list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split a b c d s=input() s input() input if c<d:
    for i in range(a-1,d-1):
        if s[i]=='#' and s[i+1]=='#':
            print('No')
            exit(0)
    print('Yes')
else:
    for i in range(b-1,d):
        if s[i-1]=='.' and s[i]=='.' and s[i+1]=='.':
            break
    else:
        print('No')
        exit(0)
    
    for i in range(a-1,c-1):
        if s[i]=='#' and s[i+1]=='#':
            print('No')
            exit(0)
    
    print('Yes') c<d c d for i in range(a-1,d-1):
        if s[i]=='#' and s[i+1]=='#':
            print('No')
            exit(0)
     i range(a-1,d-1) range a-1 a 1 d-1 d 1 if s[i]=='#' and s[i+1]=='#':
            print('No')
            exit(0)
     s[i]=='#' and s[i+1]=='#' s[i]=='#' s[i] s i '#' s[i+1]=='#' s[i+1] s i+1 i 1 '#' print('No') print 'No' exit(0) exit 0 print('Yes') print 'Yes' for i in range(b-1,d):
        if s[i-1]=='.' and s[i]=='.' and s[i+1]=='.':
            break
    else:
        print('No')
        exit(0)
    
     i range(b-1,d) range b-1 b 1 d if s[i-1]=='.' and s[i]=='.' and s[i+1]=='.':
            break
     s[i-1]=='.' and s[i]=='.' and s[i+1]=='.' s[i-1]=='.' and s[i]=='.' s[i-1]=='.' s[i-1] s i-1 i 1 '.' s[i]=='.' s[i] s i '.' s[i+1]=='.' s[i+1] s i+1 i 1 '.' break print('No') print 'No' exit(0) exit 0 for i in range(a-1,c-1):
        if s[i]=='#' and s[i+1]=='#':
            print('No')
            exit(0)
    
     i range(a-1,c-1) range a-1 a 1 c-1 c 1 if s[i]=='#' and s[i+1]=='#':
            print('No')
            exit(0)
    
     s[i]=='#' and s[i+1]=='#' s[i]=='#' s[i] s i '#' s[i+1]=='#' s[i+1] s i+1 i 1 '#' print('No') print 'No' exit(0) exit 0 print('Yes') print 'Yes' d=list(map(int,input().split())) list(map(int,input().split())) d c,d=list(map(int,input().split())) list(map(int,input().split())) c s=input() input() s n,a,b,c,d=list(map(int,input().split())) list(map(int,input().split())) n a,b,c,d=list(map(int,input().split())) list(map(int,input().split())) a b,c,d=list(map(int,input().split())) list(map(int,input().split())) b
n,a,b,c,d=list(map(int,input().split()))
s=input()

if c<d:
    for i in range(a-1,d-1):
        if s[i]=='#' and s[i+1]=='#':
            print('No')
            exit(0)
    print('Yes')
else:
    for i in range(b-1,d):
        if s[i-1]=='.' and s[i]=='.' and s[i+1]=='.':
            break
    else:
        print('No')
        exit(0)
    
    for i in range(a-1,c-1):
        if s[i]=='#' and s[i+1]=='#':
            print('No')
            exit(0)
    
    print('Yes')
