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

def check_one_people_can(start, end):
    s = S[start+1: end]
    before_sharp = False
    for x in s:
        if x == "#":
            if before_sharp:
                return False
            before_sharp = True
        else:
            before_sharp = False
    return True

def check_triple_dots(start, end):
    s = S[start-1: end+2]
    continuous_dots = 0
    for x in s:
        if x == ".":
            continuous_dots += 1
            if continuous_dots == 3:
                return True
        else:
            continuous_dots = 0
    return False

if D > C:
    if check_one_people_can(A, C) and check_one_people_can(C, D):
        print("Yes")
    else:
        print("No")
else:
    if check_triple_dots(B, D) and check_one_people_can(A, C):
        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() input A -= 1 A 1 B -= 1 B 1 C -= 1 C 1 D -= 1 D 1 def check_one_people_can(start, end):
    s = S[start+1: end]
    before_sharp = False
    for x in s:
        if x == "#":
            if before_sharp:
                return False
            before_sharp = True
        else:
            before_sharp = False
    return True check_one_people_can s = S[start+1: end] s S[start+1: end] S start+1: end start+1 start 1 end before_sharp = False before_sharp False for x in s:
        if x == "#":
            if before_sharp:
                return False
            before_sharp = True
        else:
            before_sharp = False
     x s if x == "#":
            if before_sharp:
                return False
            before_sharp = True
        else:
            before_sharp = False
     x == "#" x "#" if before_sharp:
                return False
             before_sharp return False False before_sharp = True before_sharp True before_sharp = False before_sharp False return True True start start end end def check_triple_dots(start, end):
    s = S[start-1: end+2]
    continuous_dots = 0
    for x in s:
        if x == ".":
            continuous_dots += 1
            if continuous_dots == 3:
                return True
        else:
            continuous_dots = 0
    return False check_triple_dots s = S[start-1: end+2] s S[start-1: end+2] S start-1: end+2 start-1 start 1 end+2 end 2 continuous_dots = 0 continuous_dots 0 for x in s:
        if x == ".":
            continuous_dots += 1
            if continuous_dots == 3:
                return True
        else:
            continuous_dots = 0
     x s if x == ".":
            continuous_dots += 1
            if continuous_dots == 3:
                return True
        else:
            continuous_dots = 0
     x == "." x "." continuous_dots += 1 continuous_dots 1 if continuous_dots == 3:
                return True
         continuous_dots == 3 continuous_dots 3 return True True continuous_dots = 0 continuous_dots 0 return False False start start end end if D > C:
    if check_one_people_can(A, C) and check_one_people_can(C, D):
        print("Yes")
    else:
        print("No")
else:
    if check_triple_dots(B, D) and check_one_people_can(A, C):
        print("Yes")
    else:
        print("No") D > C D C if check_one_people_can(A, C) and check_one_people_can(C, D):
        print("Yes")
    else:
        print("No") check_one_people_can(A, C) and check_one_people_can(C, D) check_one_people_can(A, C) check_one_people_can A C check_one_people_can(C, D) check_one_people_can C D print("Yes") print "Yes" print("No") print "No" if check_triple_dots(B, D) and check_one_people_can(A, C):
        print("Yes")
    else:
        print("No") check_triple_dots(B, D) and check_one_people_can(A, C) check_triple_dots(B, D) check_triple_dots B D check_one_people_can(A, C) check_one_people_can A C print("Yes") print "Yes" print("No") print "No" B -= 1 1 B def check_one_people_can(start, end):
    s = S[start+1: end]
    before_sharp = False
    for x in s:
        if x == "#":
            if before_sharp:
                return False
            before_sharp = True
        else:
            before_sharp = False
    return True def check_one_people_can(start, end):
    s = S[start+1: end]
    before_sharp = False
    for x in s:
        if x == "#":
            if before_sharp:
                return False
            before_sharp = True
        else:
            before_sharp = False
    return True check_one_people_can C -= 1 1 C S = list(input()) list(input()) S A -= 1 1 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 A, B, C, D = map(int, input().split()) map(int, input().split()) A D -= 1 1 D D = map(int, input().split()) map(int, input().split()) D def check_triple_dots(start, end):
    s = S[start-1: end+2]
    continuous_dots = 0
    for x in s:
        if x == ".":
            continuous_dots += 1
            if continuous_dots == 3:
                return True
        else:
            continuous_dots = 0
    return False def check_triple_dots(start, end):
    s = S[start-1: end+2]
    continuous_dots = 0
    for x in s:
        if x == ".":
            continuous_dots += 1
            if continuous_dots == 3:
                return True
        else:
            continuous_dots = 0
    return False check_triple_dots B, C, D = map(int, input().split()) map(int, input().split()) B
N, A, B, C, D = map(int, input().split())
S = list(input())
A -= 1
B -= 1
C -= 1
D -= 1

def check_one_people_can(start, end):
    s = S[start+1: end]
    before_sharp = False
    for x in s:
        if x == "#":
            if before_sharp:
                return False
            before_sharp = True
        else:
            before_sharp = False
    return True

def check_triple_dots(start, end):
    s = S[start-1: end+2]
    continuous_dots = 0
    for x in s:
        if x == ".":
            continuous_dots += 1
            if continuous_dots == 3:
                return True
        else:
            continuous_dots = 0
    return False

if D > C:
    if check_one_people_can(A, C) and check_one_people_can(C, D):
        print("Yes")
    else:
        print("No")
else:
    if check_triple_dots(B, D) and check_one_people_can(A, C):
        print("Yes")
    else:
        print("No")
