N,A,B,C,D = map(int,input().split())
S = "0" + input()

if C<D:
    if ("##" in S[A:C+1]) or ("##" in S[B:D+1]):
        print("No")
        exit()
    else:
        print("Yes")
        exit()
else:
    if ("##" in S[A:C+1]) or ("##" in S[B:D+1]):
        print("No")
        exit()
    else:
        if ("..." in S[B-1:D+1+1]):
            print("Yes")
            exit()
        else:
            print("No")
            exit() 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 = "0" + input() S "0" + input() "0" input() input if C<D:
    if ("##" in S[A:C+1]) or ("##" in S[B:D+1]):
        print("No")
        exit()
    else:
        print("Yes")
        exit()
else:
    if ("##" in S[A:C+1]) or ("##" in S[B:D+1]):
        print("No")
        exit()
    else:
        if ("..." in S[B-1:D+1+1]):
            print("Yes")
            exit()
        else:
            print("No")
            exit() C<D C D if ("##" in S[A:C+1]) or ("##" in S[B:D+1]):
        print("No")
        exit()
    else:
        print("Yes")
        exit() ("##" 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 print("No") print "No" exit() exit print("Yes") print "Yes" exit() exit if ("##" in S[A:C+1]) or ("##" in S[B:D+1]):
        print("No")
        exit()
    else:
        if ("..." in S[B-1:D+1+1]):
            print("Yes")
            exit()
        else:
            print("No")
            exit() ("##" 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 print("No") print "No" exit() exit if ("..." in S[B-1:D+1+1]):
            print("Yes")
            exit()
        else:
            print("No")
            exit() "..." in S[B-1:D+1+1] "..." S[B-1:D+1+1] S B-1:D+1+1 B-1 B 1 D+1+1 D+1 D 1 1 print("Yes") print "Yes" exit() exit print("No") print "No" exit() exit B,C,D = map(int,input().split()) map(int,input().split()) B S = "0" + input() "0" + input() S A,B,C,D = map(int,input().split()) map(int,input().split()) A D = map(int,input().split()) map(int,input().split()) D N,A,B,C,D = map(int,input().split()) map(int,input().split()) N C,D = map(int,input().split()) map(int,input().split()) C
N,A,B,C,D = map(int,input().split())
S = "0" + input()

if C<D:
    if ("##" in S[A:C+1]) or ("##" in S[B:D+1]):
        print("No")
        exit()
    else:
        print("Yes")
        exit()
else:
    if ("##" in S[A:C+1]) or ("##" in S[B:D+1]):
        print("No")
        exit()
    else:
        if ("..." in S[B-1:D+1+1]):
            print("Yes")
            exit()
        else:
            print("No")
            exit()
