def main():
    N, A, B, C, D = (int(i) for i in input().split())
    S = "#" + input() + "#"
    if "##" in S[A:C+1] or "##" in S[B:D+1]:
        return print("No")
    if D < C and "..." not in S[B-1:D+2]:
        return print("No")
    print("Yes")


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+1] or "##" in S[B:D+1]:
        return print("No")
    if D < C and "..." not in S[B-1:D+2]:
        return print("No")
    print("Yes") 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() "#" input() input "#" if "##" in S[A:C+1] or "##" in S[B:D+1]:
        return print("No")
     "##" in S[A:C+1] or "##" in S[B:D+1] "##" in S[A:C+1] "##" S[A:C+1] S A:C+1 A C+1 C 1 "##" in S[B:D+1] "##" S[B:D+1] S B:D+1 B D+1 D 1 return print("No") print("No") print "No" if D < C and "..." not in S[B-1:D+2]:
        return print("No")
     D < C and "..." not in S[B-1:D+2] D < C D C "..." not in S[B-1:D+2] "..." S[B-1:D+2] S B-1:D+2 B-1 B 1 D+2 D 2 return print("No") print("No") print "No" print("Yes") print "Yes" 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+1] or "##" in S[B:D+1]:
        return print("No")
    if D < C and "..." not in S[B-1:D+2]:
        return print("No")
    print("Yes") def main():
    N, A, B, C, D = (int(i) for i in input().split())
    S = "#" + input() + "#"
    if "##" in S[A:C+1] or "##" in S[B:D+1]:
        return print("No")
    if D < C and "..." not in S[B-1:D+2]:
        return print("No")
    print("Yes") main
def main():
    N, A, B, C, D = (int(i) for i in input().split())
    S = "#" + input() + "#"
    if "##" in S[A:C+1] or "##" in S[B:D+1]:
        return print("No")
    if D < C and "..." not in S[B-1:D+2]:
        return print("No")
    print("Yes")


if __name__ == '__main__':
    main()
