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