N, A, B, C, D = map(int, input().split())
S = input()
for i in range(A-1,max(C,D)-1):
    if S[i] == '#' and S[i+1] == '#':
        print('No')
        exit()
if D < C:
    for i in range(B-2,N-2):
        if S[i] == '.' and S[i+1] == '.' and S[i+2] == '.':
            print('Yes')
            exit()
        if i+1 == D-1:
            break
    print('No')
    exit()
else:
    print('Yes')
    exit() 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 for i in range(A-1,max(C,D)-1):
    if S[i] == '#' and S[i+1] == '#':
        print('No')
        exit() i range(A-1,max(C,D)-1) range A-1 A 1 max(C,D)-1 max(C,D) max C D 1 if S[i] == '#' and S[i+1] == '#':
        print('No')
        exit() 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() exit if D < C:
    for i in range(B-2,N-2):
        if S[i] == '.' and S[i+1] == '.' and S[i+2] == '.':
            print('Yes')
            exit()
        if i+1 == D-1:
            break
    print('No')
    exit()
else:
    print('Yes')
    exit() D < C D C for i in range(B-2,N-2):
        if S[i] == '.' and S[i+1] == '.' and S[i+2] == '.':
            print('Yes')
            exit()
        if i+1 == D-1:
            break
     i range(B-2,N-2) range B-2 B 2 N-2 N 2 if S[i] == '.' and S[i+1] == '.' and S[i+2] == '.':
            print('Yes')
            exit()
         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 '.' print('Yes') print 'Yes' exit() exit if i+1 == D-1:
            break
     i+1 == D-1 i+1 i 1 D-1 D 1 break print('No') print 'No' exit() exit print('Yes') print 'Yes' exit() exit S = input() input() S D = map(int, input().split()) map(int, input().split()) D A, B, C, D = map(int, input().split()) map(int, input().split()) A 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 C, D = map(int, input().split()) map(int, input().split()) C
N, A, B, C, D = map(int, input().split())
S = input()
for i in range(A-1,max(C,D)-1):
    if S[i] == '#' and S[i+1] == '#':
        print('No')
        exit()
if D < C:
    for i in range(B-2,N-2):
        if S[i] == '.' and S[i+1] == '.' and S[i+2] == '.':
            print('Yes')
            exit()
        if i+1 == D-1:
            break
    print('No')
    exit()
else:
    print('Yes')
    exit()