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

# A -= 1
# B -= 1
# C -= 1
# D -= 1

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


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

if C > D:
    cover = False
    for i in range(B, D + 1):
        if S[i - 1] == '.' and S[i] == '.' and S[i + 1] == '.':
            cover = True
    if not cover:
        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 S = "#" + S + "#" S "#" + S + "#" "#" + S "#" S "#" def can_reach(start, end):
    for i in range(start, end + 1):
        if S[i] == '#' and S[i + 1] == '#':
            return False
    return True can_reach for i in range(start, end + 1):
        if S[i] == '#' and S[i + 1] == '#':
            return False
     i range(start, end + 1) range start end + 1 end 1 if S[i] == '#' and S[i + 1] == '#':
            return False
     S[i] == '#' and S[i + 1] == '#' S[i] == '#' S[i] S i '#' S[i + 1] == '#' S[i + 1] S i + 1 i 1 '#' return False False return True True start start end end if not can_reach(A, C) or not can_reach(B, D):
    print("No")
    exit() not can_reach(A, C) or not can_reach(B, D) not can_reach(A, C) can_reach(A, C) can_reach A C not can_reach(B, D) can_reach(B, D) can_reach B D print("No") print "No" exit() exit if C > D:
    cover = False
    for i in range(B, D + 1):
        if S[i - 1] == '.' and S[i] == '.' and S[i + 1] == '.':
            cover = True
    if not cover:
        print("No")
        exit() C > D C D cover = False cover False for i in range(B, D + 1):
        if S[i - 1] == '.' and S[i] == '.' and S[i + 1] == '.':
            cover = True
     i range(B, D + 1) range B D + 1 D 1 if S[i - 1] == '.' and S[i] == '.' and S[i + 1] == '.':
            cover = True
     S[i - 1] == '.' and S[i] == '.' and S[i + 1] == '.' S[i - 1] == '.' and S[i] == '.' S[i - 1] == '.' S[i - 1] S i - 1 i 1 '.' S[i] == '.' S[i] S i '.' S[i + 1] == '.' S[i + 1] S i + 1 i 1 '.' cover = True cover True if not cover:
        print("No")
        exit() not cover cover print("No") print "No" exit() exit print("Yes") print "Yes" C, D = map(int, input().split()) map(int, input().split()) C cover = False False cover S = input() input() S B, C, D = map(int, input().split()) map(int, input().split()) B D = map(int, input().split()) map(int, input().split()) D cover = True True cover S = "#" + S + "#" "#" + S + "#" 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 def can_reach(start, end):
    for i in range(start, end + 1):
        if S[i] == '#' and S[i + 1] == '#':
            return False
    return True def can_reach(start, end):
    for i in range(start, end + 1):
        if S[i] == '#' and S[i + 1] == '#':
            return False
    return True can_reach
N, A, B, C, D = map(int, input().split())
S = input()
S = "#" + S + "#"

# A -= 1
# B -= 1
# C -= 1
# D -= 1

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


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

if C > D:
    cover = False
    for i in range(B, D + 1):
        if S[i - 1] == '.' and S[i] == '.' and S[i + 1] == '.':
            cover = True
    if not cover:
        print("No")
        exit()


print("Yes")