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

def solve():
    for i in range(A, C-3):
        if S[i:i+2] == "##":
            print("No")
            return
    for i in range(B, D-3):
        if S[i:i+2] == "##":
            print("No")
            return

    if C > D:
        for i in range(B-2, D-1):
            if S[i:i+3] == "...":
                print("Yes")
                return
        else:
            print("No")
            
    else:
        print("Yes")

solve() 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 def solve():
    for i in range(A, C-3):
        if S[i:i+2] == "##":
            print("No")
            return
    for i in range(B, D-3):
        if S[i:i+2] == "##":
            print("No")
            return

    if C > D:
        for i in range(B-2, D-1):
            if S[i:i+3] == "...":
                print("Yes")
                return
        else:
            print("No")
            
    else:
        print("Yes") solve for i in range(A, C-3):
        if S[i:i+2] == "##":
            print("No")
            return
     i range(A, C-3) range A C-3 C 3 if S[i:i+2] == "##":
            print("No")
            return
     S[i:i+2] == "##" S[i:i+2] S i:i+2 i i+2 i 2 "##" print("No") print "No" return for i in range(B, D-3):
        if S[i:i+2] == "##":
            print("No")
            return

     i range(B, D-3) range B D-3 D 3 if S[i:i+2] == "##":
            print("No")
            return

     S[i:i+2] == "##" S[i:i+2] S i:i+2 i i+2 i 2 "##" print("No") print "No" return if C > D:
        for i in range(B-2, D-1):
            if S[i:i+3] == "...":
                print("Yes")
                return
        else:
            print("No")
            
    else:
        print("Yes") C > D C D for i in range(B-2, D-1):
            if S[i:i+3] == "...":
                print("Yes")
                return
        else:
            print("No")
            
     i range(B-2, D-1) range B-2 B 2 D-1 D 1 if S[i:i+3] == "...":
                print("Yes")
                return
         S[i:i+3] == "..." S[i:i+3] S i:i+3 i i+3 i 3 "..." print("Yes") print "Yes" return print("No") print "No" print("Yes") print "Yes" solve() solve B, C, D = map(int, input().split()) map(int, input().split()) B def solve():
    for i in range(A, C-3):
        if S[i:i+2] == "##":
            print("No")
            return
    for i in range(B, D-3):
        if S[i:i+2] == "##":
            print("No")
            return

    if C > D:
        for i in range(B-2, D-1):
            if S[i:i+3] == "...":
                print("Yes")
                return
        else:
            print("No")
            
    else:
        print("Yes") def solve():
    for i in range(A, C-3):
        if S[i:i+2] == "##":
            print("No")
            return
    for i in range(B, D-3):
        if S[i:i+2] == "##":
            print("No")
            return

    if C > D:
        for i in range(B-2, D-1):
            if S[i:i+3] == "...":
                print("Yes")
                return
        else:
            print("No")
            
    else:
        print("Yes") solve D = map(int, input().split()) map(int, input().split()) D S = input() input() S A, B, C, D = map(int, input().split()) map(int, input().split()) A 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 = input()

def solve():
    for i in range(A, C-3):
        if S[i:i+2] == "##":
            print("No")
            return
    for i in range(B, D-3):
        if S[i:i+2] == "##":
            print("No")
            return

    if C > D:
        for i in range(B-2, D-1):
            if S[i:i+3] == "...":
                print("Yes")
                return
        else:
            print("No")
            
    else:
        print("Yes")

solve()