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

def can(start, end):
    for i in range(start, end):
        if S[i] == S[i + 1] == "#":
            return False
    return True

def main():
    if not (can(A, C) and can(B, D)):
        return False

    if C < D:
        return True
    elif C > D:
        for i in range(B, D + 1):
            if S[i - 1] == S[i] == S[i + 1] == ".":
                return True
        return False

if __name__ == "__main__":
    if main():
        print('Yes')
    else:
        print('No') 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 = [""] + list(input()) + [""] S [""] + list(input()) + [""] [""] + list(input()) [""] "" list(input()) list input() input [""] "" def can(start, end):
    for i in range(start, end):
        if S[i] == S[i + 1] == "#":
            return False
    return True can for i in range(start, end):
        if S[i] == S[i + 1] == "#":
            return False
     i range(start, end) range start end if S[i] == S[i + 1] == "#":
            return False
     S[i] == S[i + 1] == "#" S[i] == S[i + 1] S[i] S i S[i + 1] S i + 1 i 1 "#" return False False return True True start start end end def main():
    if not (can(A, C) and can(B, D)):
        return False

    if C < D:
        return True
    elif C > D:
        for i in range(B, D + 1):
            if S[i - 1] == S[i] == S[i + 1] == ".":
                return True
        return False main if not (can(A, C) and can(B, D)):
        return False

     not (can(A, C) and can(B, D)) can(A, C) and can(B, D) can(A, C) can A C can(B, D) can B D return False False if C < D:
        return True
    elif C > D:
        for i in range(B, D + 1):
            if S[i - 1] == S[i] == S[i + 1] == ".":
                return True
        return False C < D C D return True True elif C > D:
        for i in range(B, D + 1):
            if S[i - 1] == S[i] == S[i + 1] == ".":
                return True
        return False C > D C D for i in range(B, D + 1):
            if S[i - 1] == S[i] == S[i + 1] == ".":
                return True
         i range(B, D + 1) range B D + 1 D 1 if S[i - 1] == S[i] == S[i + 1] == ".":
                return True
         S[i - 1] == S[i] == S[i + 1] == "." S[i - 1] == S[i] == S[i + 1] S[i - 1] == S[i] S[i - 1] S i - 1 i 1 S[i] S i S[i + 1] S i + 1 i 1 "." return True True return False False if __name__ == "__main__":
    if main():
        print('Yes')
    else:
        print('No') __name__ == "__main__" __name__ "__main__" if main():
        print('Yes')
    else:
        print('No') main() main print('Yes') print 'Yes' print('No') print 'No' A,B,C,D = map(int, input().split()) map(int, input().split()) A def main():
    if not (can(A, C) and can(B, D)):
        return False

    if C < D:
        return True
    elif C > D:
        for i in range(B, D + 1):
            if S[i - 1] == S[i] == S[i + 1] == ".":
                return True
        return False def main():
    if not (can(A, C) and can(B, D)):
        return False

    if C < D:
        return True
    elif C > D:
        for i in range(B, D + 1):
            if S[i - 1] == S[i] == S[i + 1] == ".":
                return True
        return False main B,C,D = map(int, input().split()) map(int, input().split()) B D = map(int, input().split()) map(int, input().split()) D S = [""] + list(input()) + [""] [""] + list(input()) + [""] S 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 def can(start, end):
    for i in range(start, end):
        if S[i] == S[i + 1] == "#":
            return False
    return True def can(start, end):
    for i in range(start, end):
        if S[i] == S[i + 1] == "#":
            return False
    return True can
N,A,B,C,D = map(int, input().split())
S = [""] + list(input()) + [""]

def can(start, end):
    for i in range(start, end):
        if S[i] == S[i + 1] == "#":
            return False
    return True

def main():
    if not (can(A, C) and can(B, D)):
        return False

    if C < D:
        return True
    elif C > D:
        for i in range(B, D + 1):
            if S[i - 1] == S[i] == S[i + 1] == ".":
                return True
        return False

if __name__ == "__main__":
    if main():
        print('Yes')
    else:
        print('No')