n,a,b,c,d = map(int,input().split())
s = [i == "#" for i in list(input())]
s.append(False)
def check_route(x,y):
    for i in range(x,y):
        if s[i] and s[i+1]:
            return False
    return True

def check_three(x,y):
    for i in range(x-1,y):
        if (not s[i]) and (not s[i+1]) and (not s[i+2]):
            return True
    return False

if c < d:
    if check_route(a-1,c-1) and check_route(b-1,d-1):
        print("Yes")
    else:
        print("No")
else:
    if check_route(a-1,c-1) and check_route(b-1,d-1):
        if check_three(b-1,d-1):
            print("Yes")
        else:
            print("No")
    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 i == "#" for i in list(input()) for i in list(input()) i list(input()) list input() input for i in list(input()) i == "#" i "#" s = [i == "#" for i in list(input())] s [i == "#" for i in list(input())] s.append(False) s.append s append False def check_route(x,y):
    for i in range(x,y):
        if s[i] and s[i+1]:
            return False
    return True check_route for i in range(x,y):
        if s[i] and s[i+1]:
            return False
     i range(x,y) range x y if s[i] and s[i+1]:
            return False
     s[i] and s[i+1] s[i] s i s[i+1] s i+1 i 1 return False False return True True x x y y def check_three(x,y):
    for i in range(x-1,y):
        if (not s[i]) and (not s[i+1]) and (not s[i+2]):
            return True
    return False check_three for i in range(x-1,y):
        if (not s[i]) and (not s[i+1]) and (not s[i+2]):
            return True
     i range(x-1,y) range x-1 x 1 y if (not s[i]) and (not s[i+1]) and (not s[i+2]):
            return True
     (not s[i]) and (not s[i+1]) and (not s[i+2]) (not s[i]) and (not s[i+1]) not s[i] s[i] s i not s[i+1] s[i+1] s i+1 i 1 not s[i+2] s[i+2] s i+2 i 2 return True True return False False x x y y if c < d:
    if check_route(a-1,c-1) and check_route(b-1,d-1):
        print("Yes")
    else:
        print("No")
else:
    if check_route(a-1,c-1) and check_route(b-1,d-1):
        if check_three(b-1,d-1):
            print("Yes")
        else:
            print("No")
    else:
        print("No") c < d c d if check_route(a-1,c-1) and check_route(b-1,d-1):
        print("Yes")
    else:
        print("No") check_route(a-1,c-1) and check_route(b-1,d-1) check_route(a-1,c-1) check_route a-1 a 1 c-1 c 1 check_route(b-1,d-1) check_route b-1 b 1 d-1 d 1 print("Yes") print "Yes" print("No") print "No" if check_route(a-1,c-1) and check_route(b-1,d-1):
        if check_three(b-1,d-1):
            print("Yes")
        else:
            print("No")
    else:
        print("No") check_route(a-1,c-1) and check_route(b-1,d-1) check_route(a-1,c-1) check_route a-1 a 1 c-1 c 1 check_route(b-1,d-1) check_route b-1 b 1 d-1 d 1 if check_three(b-1,d-1):
            print("Yes")
        else:
            print("No")
     check_three(b-1,d-1) check_three b-1 b 1 d-1 d 1 print("Yes") print "Yes" print("No") print "No" print("No") print "No" b,c,d = map(int,input().split()) map(int,input().split()) b def check_route(x,y):
    for i in range(x,y):
        if s[i] and s[i+1]:
            return False
    return True def check_route(x,y):
    for i in range(x,y):
        if s[i] and s[i+1]:
            return False
    return True check_route 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 check_three(x,y):
    for i in range(x-1,y):
        if (not s[i]) and (not s[i+1]) and (not s[i+2]):
            return True
    return False def check_three(x,y):
    for i in range(x-1,y):
        if (not s[i]) and (not s[i+1]) and (not s[i+2]):
            return True
    return False check_three d = map(int,input().split()) map(int,input().split()) d s = [i == "#" for i in list(input())] [i == "#" for i in list(input())] s a,b,c,d = map(int,input().split()) map(int,input().split()) a
n,a,b,c,d = map(int,input().split())
s = [i == "#" for i in list(input())]
s.append(False)
def check_route(x,y):
    for i in range(x,y):
        if s[i] and s[i+1]:
            return False
    return True

def check_three(x,y):
    for i in range(x-1,y):
        if (not s[i]) and (not s[i+1]) and (not s[i+2]):
            return True
    return False

if c < d:
    if check_route(a-1,c-1) and check_route(b-1,d-1):
        print("Yes")
    else:
        print("No")
else:
    if check_route(a-1,c-1) and check_route(b-1,d-1):
        if check_three(b-1,d-1):
            print("Yes")
        else:
            print("No")
    else:
        print("No")