def main():
    N, A, B, C, D = map(int, input().split())
    S = list(input())
    E = max(C, D)
    cnt = 0
    for i in range(A-1, E):
        if S[i] == '#':
            cnt += 1
        else:
            cnt = 0
        if cnt >= 2:
            print('No')
            return
    if C < D:
        print('Yes')
        return
    cnt = 0
    for i in range(B-2, D+1):
        if S[i] == '.':
            cnt += 1
        else:
            cnt = 0
        if cnt >= 3:
            print('Yes')
            return
    print('No')
        
if __name__ == "__main__":
    main() def main():
    N, A, B, C, D = map(int, input().split())
    S = list(input())
    E = max(C, D)
    cnt = 0
    for i in range(A-1, E):
        if S[i] == '#':
            cnt += 1
        else:
            cnt = 0
        if cnt >= 2:
            print('No')
            return
    if C < D:
        print('Yes')
        return
    cnt = 0
    for i in range(B-2, D+1):
        if S[i] == '.':
            cnt += 1
        else:
            cnt = 0
        if cnt >= 3:
            print('Yes')
            return
    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 = list(input()) S list(input()) list input() input E = max(C, D) E max(C, D) max C D cnt = 0 cnt 0 for i in range(A-1, E):
        if S[i] == '#':
            cnt += 1
        else:
            cnt = 0
        if cnt >= 2:
            print('No')
            return
     i range(A-1, E) range A-1 A 1 E if S[i] == '#':
            cnt += 1
        else:
            cnt = 0
         S[i] == '#' S[i] S i '#' cnt += 1 cnt 1 cnt = 0 cnt 0 if cnt >= 2:
            print('No')
            return
     cnt >= 2 cnt 2 print('No') print 'No' return if C < D:
        print('Yes')
        return
     C < D C D print('Yes') print 'Yes' return cnt = 0 cnt 0 for i in range(B-2, D+1):
        if S[i] == '.':
            cnt += 1
        else:
            cnt = 0
        if cnt >= 3:
            print('Yes')
            return
     i range(B-2, D+1) range B-2 B 2 D+1 D 1 if S[i] == '.':
            cnt += 1
        else:
            cnt = 0
         S[i] == '.' S[i] S i '.' cnt += 1 cnt 1 cnt = 0 cnt 0 if cnt >= 3:
            print('Yes')
            return
     cnt >= 3 cnt 3 print('Yes') print 'Yes' return 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 = list(input())
    E = max(C, D)
    cnt = 0
    for i in range(A-1, E):
        if S[i] == '#':
            cnt += 1
        else:
            cnt = 0
        if cnt >= 2:
            print('No')
            return
    if C < D:
        print('Yes')
        return
    cnt = 0
    for i in range(B-2, D+1):
        if S[i] == '.':
            cnt += 1
        else:
            cnt = 0
        if cnt >= 3:
            print('Yes')
            return
    print('No')
         def main():
    N, A, B, C, D = map(int, input().split())
    S = list(input())
    E = max(C, D)
    cnt = 0
    for i in range(A-1, E):
        if S[i] == '#':
            cnt += 1
        else:
            cnt = 0
        if cnt >= 2:
            print('No')
            return
    if C < D:
        print('Yes')
        return
    cnt = 0
    for i in range(B-2, D+1):
        if S[i] == '.':
            cnt += 1
        else:
            cnt = 0
        if cnt >= 3:
            print('Yes')
            return
    print('No')
         main
def main():
    N, A, B, C, D = map(int, input().split())
    S = list(input())
    E = max(C, D)
    cnt = 0
    for i in range(A-1, E):
        if S[i] == '#':
            cnt += 1
        else:
            cnt = 0
        if cnt >= 2:
            print('No')
            return
    if C < D:
        print('Yes')
        return
    cnt = 0
    for i in range(B-2, D+1):
        if S[i] == '.':
            cnt += 1
        else:
            cnt = 0
        if cnt >= 3:
            print('Yes')
            return
    print('No')
        
if __name__ == "__main__":
    main()
