import sys
readline = sys.stdin.buffer.readline
sys.setrecursionlimit(10 ** 8)
INF = float('inf')
MOD = 10 ** 9 + 7



def main():
    int1 = lambda x: int(x) - 1
    N, A, B, C, D = map(int1, input().split())
    S = input()

    if "##" not in S[A:B + 1] and "##" not in S[C:D + 1]:
        if C > D and "..." not in S[B - 1:D + 2]:
            print("No")
        else:
            print("Yes")
    else:
        print("No")


if __name__ == '__main__':
    main() import sys sys readline = sys.stdin.buffer.readline readline sys.stdin.buffer.readline sys.stdin.buffer sys.stdin sys stdin buffer readline sys.setrecursionlimit(10 ** 8) sys.setrecursionlimit sys setrecursionlimit 10 ** 8 10 8 INF = float('inf') INF float('inf') float 'inf' MOD = 10 ** 9 + 7 MOD 10 ** 9 + 7 10 ** 9 10 9 7 def main():
    int1 = lambda x: int(x) - 1
    N, A, B, C, D = map(int1, input().split())
    S = input()

    if "##" not in S[A:B + 1] and "##" not in S[C:D + 1]:
        if C > D and "..." not in S[B - 1:D + 2]:
            print("No")
        else:
            print("Yes")
    else:
        print("No") main int1 = lambda x: int(x) - 1 int1 lambda x: int(x) - 1 int(x) - 1 int(x) int x 1 x N, A, B, C, D = map(int1, input().split()) N map(int1, input().split()) map int1 input().split() ().split () input split A B C D S = input() S input() input if "##" not in S[A:B + 1] and "##" not in S[C:D + 1]:
        if C > D and "..." not in S[B - 1:D + 2]:
            print("No")
        else:
            print("Yes")
    else:
        print("No") "##" not in S[A:B + 1] and "##" not in S[C:D + 1] "##" not in S[A:B + 1] "##" S[A:B + 1] S A:B + 1 A B + 1 B 1 "##" not in S[C:D + 1] "##" S[C:D + 1] S C:D + 1 C D + 1 D 1 if C > D and "..." not in S[B - 1:D + 2]:
            print("No")
        else:
            print("Yes")
     C > D and "..." not in S[B - 1:D + 2] C > D C D "..." 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 print("No") print "No" print("Yes") print "Yes" print("No") print "No" if __name__ == '__main__':
    main() __name__ == '__main__' __name__ '__main__' main() main readline = sys.stdin.buffer.readline sys.stdin.buffer.readline readline MOD = 10 ** 9 + 7 10 ** 9 + 7 MOD def main():
    int1 = lambda x: int(x) - 1
    N, A, B, C, D = map(int1, input().split())
    S = input()

    if "##" not in S[A:B + 1] and "##" not in S[C:D + 1]:
        if C > D and "..." not in S[B - 1:D + 2]:
            print("No")
        else:
            print("Yes")
    else:
        print("No") def main():
    int1 = lambda x: int(x) - 1
    N, A, B, C, D = map(int1, input().split())
    S = input()

    if "##" not in S[A:B + 1] and "##" not in S[C:D + 1]:
        if C > D and "..." not in S[B - 1:D + 2]:
            print("No")
        else:
            print("Yes")
    else:
        print("No") main INF = float('inf') float('inf') INF
import sys
readline = sys.stdin.buffer.readline
sys.setrecursionlimit(10 ** 8)
INF = float('inf')
MOD = 10 ** 9 + 7



def main():
    int1 = lambda x: int(x) - 1
    N, A, B, C, D = map(int1, input().split())
    S = input()

    if "##" not in S[A:B + 1] and "##" not in S[C:D + 1]:
        if C > D and "..." not in S[B - 1:D + 2]:
            print("No")
        else:
            print("Yes")
    else:
        print("No")


if __name__ == '__main__':
    main()