def main():
    n, a, b, c, d = map(int, input().split())
    a -= 1; b -= 1; c -= 1; d -= 1;
    s = input()

    if c < d:
        for i in range(a, d-1):
            if s[i:i+2] == "##":
                print("No")
                return 0
        print("Yes")

    else:
        for i in range(a, c-1):
            if s[i:i+2] == "##":
                print("No")
                return 0
        for i in range(b-1, d):
            if s[i:i+3] == "...":
                print("Yes")
                return 0
        print("No")

main() def main():
    n, a, b, c, d = map(int, input().split())
    a -= 1; b -= 1; c -= 1; d -= 1;
    s = input()

    if c < d:
        for i in range(a, d-1):
            if s[i:i+2] == "##":
                print("No")
                return 0
        print("Yes")

    else:
        for i in range(a, c-1):
            if s[i:i+2] == "##":
                print("No")
                return 0
        for i in range(b-1, d):
            if s[i:i+3] == "...":
                print("Yes")
                return 0
        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 a -= 1 a 1 b -= 1 b 1 c -= 1 c 1 d -= 1 d 1 s = input() s input() input if c < d:
        for i in range(a, d-1):
            if s[i:i+2] == "##":
                print("No")
                return 0
        print("Yes")

    else:
        for i in range(a, c-1):
            if s[i:i+2] == "##":
                print("No")
                return 0
        for i in range(b-1, d):
            if s[i:i+3] == "...":
                print("Yes")
                return 0
        print("No") c < d c d for i in range(a, d-1):
            if s[i:i+2] == "##":
                print("No")
                return 0
         i range(a, d-1) range a d-1 d 1 if s[i:i+2] == "##":
                print("No")
                return 0
         s[i:i+2] == "##" s[i:i+2] s i:i+2 i i+2 i 2 "##" print("No") print "No" return 0 0 print("Yes") print "Yes" for i in range(a, c-1):
            if s[i:i+2] == "##":
                print("No")
                return 0
         i range(a, c-1) range a c-1 c 1 if s[i:i+2] == "##":
                print("No")
                return 0
         s[i:i+2] == "##" s[i:i+2] s i:i+2 i i+2 i 2 "##" print("No") print "No" return 0 0 for i in range(b-1, d):
            if s[i:i+3] == "...":
                print("Yes")
                return 0
         i range(b-1, d) range b-1 b 1 d if s[i:i+3] == "...":
                print("Yes")
                return 0
         s[i:i+3] == "..." s[i:i+3] s i:i+3 i i+3 i 3 "..." print("Yes") print "Yes" return 0 0 print("No") print "No" main() main def main():
    n, a, b, c, d = map(int, input().split())
    a -= 1; b -= 1; c -= 1; d -= 1;
    s = input()

    if c < d:
        for i in range(a, d-1):
            if s[i:i+2] == "##":
                print("No")
                return 0
        print("Yes")

    else:
        for i in range(a, c-1):
            if s[i:i+2] == "##":
                print("No")
                return 0
        for i in range(b-1, d):
            if s[i:i+3] == "...":
                print("Yes")
                return 0
        print("No") def main():
    n, a, b, c, d = map(int, input().split())
    a -= 1; b -= 1; c -= 1; d -= 1;
    s = input()

    if c < d:
        for i in range(a, d-1):
            if s[i:i+2] == "##":
                print("No")
                return 0
        print("Yes")

    else:
        for i in range(a, c-1):
            if s[i:i+2] == "##":
                print("No")
                return 0
        for i in range(b-1, d):
            if s[i:i+3] == "...":
                print("Yes")
                return 0
        print("No") main
def main():
    n, a, b, c, d = map(int, input().split())
    a -= 1; b -= 1; c -= 1; d -= 1;
    s = input()

    if c < d:
        for i in range(a, d-1):
            if s[i:i+2] == "##":
                print("No")
                return 0
        print("Yes")

    else:
        for i in range(a, c-1):
            if s[i:i+2] == "##":
                print("No")
                return 0
        for i in range(b-1, d):
            if s[i:i+3] == "...":
                print("Yes")
                return 0
        print("No")

main()
