#!/usr/bin/env python3

def main():
    N, A, B, C, D = map(int, input().split())
    S = input()
    ans = 'Yes'
    if C <D:
        if '##' in S[B-1:D] or '##' in S[A-1:C]:
            ans = 'No'
    else:
        if '##' in S[A-1:C] or '...' not in S[B-2:D+1]:
            ans = 'No'
    print(ans)


if __name__ == "__main__":
    main() def main():
    N, A, B, C, D = map(int, input().split())
    S = input()
    ans = 'Yes'
    if C <D:
        if '##' in S[B-1:D] or '##' in S[A-1:C]:
            ans = 'No'
    else:
        if '##' in S[A-1:C] or '...' not in S[B-2:D+1]:
            ans = 'No'
    print(ans) 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 ans = 'Yes' ans 'Yes' if C <D:
        if '##' in S[B-1:D] or '##' in S[A-1:C]:
            ans = 'No'
    else:
        if '##' in S[A-1:C] or '...' not in S[B-2:D+1]:
            ans = 'No'
     C <D C D if '##' in S[B-1:D] or '##' in S[A-1:C]:
            ans = 'No'
     '##' in S[B-1:D] or '##' in S[A-1:C] '##' in S[B-1:D] '##' S[B-1:D] S B-1:D B-1 B 1 D '##' in S[A-1:C] '##' S[A-1:C] S A-1:C A-1 A 1 C ans = 'No' ans 'No' if '##' in S[A-1:C] or '...' not in S[B-2:D+1]:
            ans = 'No'
     '##' in S[A-1:C] or '...' not in S[B-2:D+1] '##' in S[A-1:C] '##' S[A-1:C] S A-1:C A-1 A 1 C '...' not in S[B-2:D+1] '...' S[B-2:D+1] S B-2:D+1 B-2 B 2 D+1 D 1 ans = 'No' ans 'No' print(ans) print ans if __name__ == "__main__":
    main() __name__ == "__main__" __name__ "__main__" main() main def main():
    N, A, B, C, D = map(int, input().split())
    S = input()
    ans = 'Yes'
    if C <D:
        if '##' in S[B-1:D] or '##' in S[A-1:C]:
            ans = 'No'
    else:
        if '##' in S[A-1:C] or '...' not in S[B-2:D+1]:
            ans = 'No'
    print(ans) def main():
    N, A, B, C, D = map(int, input().split())
    S = input()
    ans = 'Yes'
    if C <D:
        if '##' in S[B-1:D] or '##' in S[A-1:C]:
            ans = 'No'
    else:
        if '##' in S[A-1:C] or '...' not in S[B-2:D+1]:
            ans = 'No'
    print(ans) main
#!/usr/bin/env python3

def main():
    N, A, B, C, D = map(int, input().split())
    S = input()
    ans = 'Yes'
    if C <D:
        if '##' in S[B-1:D] or '##' in S[A-1:C]:
            ans = 'No'
    else:
        if '##' in S[A-1:C] or '...' not in S[B-2:D+1]:
            ans = 'No'
    print(ans)


if __name__ == "__main__":
    main()
