def main():
    N, a, b, c, d = (int(i) for i in input().split())
    S = input()
    if "##" in S[a:c] or "##" in S[b:d]:
        return print("No")
    if c < d:
        return print("Yes")
    # d < c
    if "..." in S[b-2:d+1]:
        print("Yes")
    else:
        print("No")


if __name__ == '__main__':
    main() def main():
    N, a, b, c, d = (int(i) for i in input().split())
    S = input()
    if "##" in S[a:c] or "##" in S[b:d]:
        return print("No")
    if c < d:
        return print("Yes")
    # d < c
    if "..." in S[b-2:d+1]:
        print("Yes")
    else:
        print("No") main int(i) for i in input().split() for i in input().split() i input().split() ().split () input split for i in input().split() int(i) int i N, a, b, c, d = (int(i) for i in input().split()) N (int(i) for i in input().split()) a b c d S = input() S input() input if "##" in S[a:c] or "##" in S[b:d]:
        return print("No")
     "##" in S[a:c] or "##" in S[b:d] "##" in S[a:c] "##" S[a:c] S a:c a c "##" in S[b:d] "##" S[b:d] S b:d b d return print("No") print("No") print "No" if c < d:
        return print("Yes")
    # d < c
     c < d c d return print("Yes") print("Yes") print "Yes" if "..." in S[b-2:d+1]:
        print("Yes")
    else:
        print("No") "..." 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("Yes") print "Yes" print("No") print "No" if __name__ == '__main__':
    main() __name__ == '__main__' __name__ '__main__' main() main def main():
    N, a, b, c, d = (int(i) for i in input().split())
    S = input()
    if "##" in S[a:c] or "##" in S[b:d]:
        return print("No")
    if c < d:
        return print("Yes")
    # d < c
    if "..." in S[b-2:d+1]:
        print("Yes")
    else:
        print("No") def main():
    N, a, b, c, d = (int(i) for i in input().split())
    S = input()
    if "##" in S[a:c] or "##" in S[b:d]:
        return print("No")
    if c < d:
        return print("Yes")
    # d < c
    if "..." in S[b-2:d+1]:
        print("Yes")
    else:
        print("No") main
def main():
    N, a, b, c, d = (int(i) for i in input().split())
    S = input()
    if "##" in S[a:c] or "##" in S[b:d]:
        return print("No")
    if c < d:
        return print("Yes")
    # d < c
    if "..." in S[b-2:d+1]:
        print("Yes")
    else:
        print("No")


if __name__ == '__main__':
    main()
