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

for i in range(A-1,C):
    if S[i] == '#' and S[i+1] == '#':
        print('No')
        exit()

for ii in range(B-1,D):
    if S[ii] == '#' and S[ii+1] == '#':
        print('No')
        exit()

if C > D:
    for j in range(B-1,D):
        if S[j-1] == '.' and S[j] == '.' and S[j+1] == '.':
            print('Yes')
            exit()

    print('No')
    exit()

else:
    print('Yes')
    exit() 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 for i in range(A-1,C):
    if S[i] == '#' and S[i+1] == '#':
        print('No')
        exit() i range(A-1,C) range A-1 A 1 C 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 for ii in range(B-1,D):
    if S[ii] == '#' and S[ii+1] == '#':
        print('No')
        exit() ii range(B-1,D) range B-1 B 1 D if S[ii] == '#' and S[ii+1] == '#':
        print('No')
        exit() S[ii] == '#' and S[ii+1] == '#' S[ii] == '#' S[ii] S ii '#' S[ii+1] == '#' S[ii+1] S ii+1 ii 1 '#' print('No') print 'No' exit() exit if C > D:
    for j in range(B-1,D):
        if S[j-1] == '.' and S[j] == '.' and S[j+1] == '.':
            print('Yes')
            exit()

    print('No')
    exit()

else:
    print('Yes')
    exit() C > D C D for j in range(B-1,D):
        if S[j-1] == '.' and S[j] == '.' and S[j+1] == '.':
            print('Yes')
            exit()

     j range(B-1,D) range B-1 B 1 D if S[j-1] == '.' and S[j] == '.' and S[j+1] == '.':
            print('Yes')
            exit()

     S[j-1] == '.' and S[j] == '.' and S[j+1] == '.' S[j-1] == '.' and S[j] == '.' S[j-1] == '.' S[j-1] S j-1 j 1 '.' S[j] == '.' S[j] S j '.' S[j+1] == '.' S[j+1] S j+1 j 1 '.' print('Yes') print 'Yes' exit() exit print('No') print 'No' exit() exit print('Yes') print 'Yes' exit() exit B, C, D = list(map(int,input().split())) list(map(int,input().split())) B D = list(map(int,input().split())) list(map(int,input().split())) D A, B, C, D = list(map(int,input().split())) list(map(int,input().split())) A N, A, B, C, D = list(map(int,input().split())) list(map(int,input().split())) N 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()))
S = input()

for i in range(A-1,C):
    if S[i] == '#' and S[i+1] == '#':
        print('No')
        exit()

for ii in range(B-1,D):
    if S[ii] == '#' and S[ii+1] == '#':
        print('No')
        exit()

if C > D:
    for j in range(B-1,D):
        if S[j-1] == '.' and S[j] == '.' and S[j+1] == '.':
            print('Yes')
            exit()

    print('No')
    exit()

else:
    print('Yes')
    exit()