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

# twoblock = S[A:].count("##")


def twoblock(start, end):
    return S[start : end + 1].count("##")


tripledot = S[B - 1 : D + 2].count("...")

if twoblock(A, C) or twoblock(B, D):
    print("No")
    exit()

if C > D:
    if tripledot == 0:
        print("No")
        exit()

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() "#" input() input "#" def twoblock(start, end):
    return S[start : end + 1].count("##") twoblock return S[start : end + 1].count("##") S[start : end + 1].count("##") [start : end + 1].count [start : end + 1] S start : end + 1 start end + 1 end 1 count "##" start start end end tripledot = S[B - 1 : D + 2].count("...") tripledot S[B - 1 : D + 2].count("...") [B - 1 : D + 2].count [B - 1 : D + 2] S B - 1 : D + 2 B - 1 B 1 D + 2 D 2 count "..." if twoblock(A, C) or twoblock(B, D):
    print("No")
    exit() twoblock(A, C) or twoblock(B, D) twoblock(A, C) twoblock A C twoblock(B, D) twoblock B D print("No") print "No" exit() exit if C > D:
    if tripledot == 0:
        print("No")
        exit() C > D C D if tripledot == 0:
        print("No")
        exit() tripledot == 0 tripledot 0 print("No") print "No" exit() exit print("Yes") print "Yes" S = "#" + input() + "#" "#" + input() + "#" S N, A, B, C, D = map(int, input().split()) map(int, input().split()) N A, B, C, D = map(int, input().split()) map(int, input().split()) A B, C, D = map(int, input().split()) map(int, input().split()) B C, D = map(int, input().split()) map(int, input().split()) C tripledot = S[B - 1 : D + 2].count("...") S[B - 1 : D + 2].count("...") tripledot D = map(int, input().split()) map(int, input().split()) D def twoblock(start, end):
    return S[start : end + 1].count("##") def twoblock(start, end):
    return S[start : end + 1].count("##") twoblock
N, A, B, C, D = map(int, input().split())
S = "#" + input() + "#"

# twoblock = S[A:].count("##")


def twoblock(start, end):
    return S[start : end + 1].count("##")


tripledot = S[B - 1 : D + 2].count("...")

if twoblock(A, C) or twoblock(B, D):
    print("No")
    exit()

if C > D:
    if tripledot == 0:
        print("No")
        exit()

print("Yes")

