def main():
    N, A, B, C, D = map(int, input().split())
    S = input()
    for i in range(A-1,D):
        if S[i] == '#' and S[i+1] == '#':
            print('No')
            exit()
    
    if C < D:
        print('Yes')
        exit()
    
    for i in range(B-1,D):
        if D != len(S):
            if S[i-1] == '.' and S[i] == '.' and S[i+1] == '.':
                print('Yes')
                exit()

    print('No')


if __name__ == "__main__":
    main() def main():
    N, A, B, C, D = map(int, input().split())
    S = input()
    for i in range(A-1,D):
        if S[i] == '#' and S[i+1] == '#':
            print('No')
            exit()
    
    if C < D:
        print('Yes')
        exit()
    
    for i in range(B-1,D):
        if D != len(S):
            if S[i-1] == '.' and S[i] == '.' and S[i+1] == '.':
                print('Yes')
                exit()

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

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

     D != len(S) D len(S) len S if S[i-1] == '.' and S[i] == '.' and S[i+1] == '.':
                print('Yes')
                exit()

     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 '.' print('Yes') print 'Yes' exit() exit print('No') print 'No' if __name__ == "__main__":
    main() __name__ == "__main__" __name__ "__main__" main() main def main():
    N, A, B, C, D = map(int, input().split())
    S = input()
    for i in range(A-1,D):
        if S[i] == '#' and S[i+1] == '#':
            print('No')
            exit()
    
    if C < D:
        print('Yes')
        exit()
    
    for i in range(B-1,D):
        if D != len(S):
            if S[i-1] == '.' and S[i] == '.' and S[i+1] == '.':
                print('Yes')
                exit()

    print('No') def main():
    N, A, B, C, D = map(int, input().split())
    S = input()
    for i in range(A-1,D):
        if S[i] == '#' and S[i+1] == '#':
            print('No')
            exit()
    
    if C < D:
        print('Yes')
        exit()
    
    for i in range(B-1,D):
        if D != len(S):
            if S[i-1] == '.' and S[i] == '.' and S[i+1] == '.':
                print('Yes')
                exit()

    print('No') main
def main():
    N, A, B, C, D = map(int, input().split())
    S = input()
    for i in range(A-1,D):
        if S[i] == '#' and S[i+1] == '#':
            print('No')
            exit()
    
    if C < D:
        print('Yes')
        exit()
    
    for i in range(B-1,D):
        if D != len(S):
            if S[i-1] == '.' and S[i] == '.' and S[i+1] == '.':
                print('Yes')
                exit()

    print('No')


if __name__ == "__main__":
    main()
