N, A, B, C, D = map(int, input().split())
s = input()

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

if C > D:
    if "##" in s:
        print("No")
    else:
        if "..." in s[B-2:D+1]:
            print("Yes")
        else:
            print("No")
else:
    if "##" in s[min(A,B)-1:D]:
        print("No")
    else:
        print("Yes")