n,a,b,c,d = map(int, input().split())
s = list(input())
s.append(".")
a -= 1
b -= 1
c -= 1
d -= 1

if c > d:
    if "##" not in "".join(s[a+1:c]) and "##" not in "".join(s[b+1:d]) and "..." in "".join(s[b-1:d+2]):
        print("Yes")
    else: print("No")
else:
    if "##" not in "".join(s[a+1:c]) and "##" not in "".join(s[b+1:d]):
        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 s.append(".") s.append s append "." a -= 1 a 1 b -= 1 b 1 c -= 1 c 1 d -= 1 d 1 if c > d:
    if "##" not in "".join(s[a+1:c]) and "##" not in "".join(s[b+1:d]) and "..." in "".join(s[b-1:d+2]):
        print("Yes")
    else: print("No")
else:
    if "##" not in "".join(s[a+1:c]) and "##" not in "".join(s[b+1:d]):
        print("Yes")
    else: print("No") c > d c d if "##" not in "".join(s[a+1:c]) and "##" not in "".join(s[b+1:d]) and "..." in "".join(s[b-1:d+2]):
        print("Yes")
    else: print("No") "##" not in "".join(s[a+1:c]) and "##" not in "".join(s[b+1:d]) and "..." in "".join(s[b-1:d+2]) "##" not in "".join(s[a+1:c]) and "##" not in "".join(s[b+1:d]) "##" not in "".join(s[a+1:c]) "##" "".join(s[a+1:c]) "".join "" join s[a+1:c] s a+1:c a+1 a 1 c "##" not in "".join(s[b+1:d]) "##" "".join(s[b+1:d]) "".join "" join s[b+1:d] s b+1:d b+1 b 1 d "..." in "".join(s[b-1:d+2]) "..." "".join(s[b-1:d+2]) "".join "" join s[b-1:d+2] s b-1:d+2 b-1 b 1 d+2 d 2 print("Yes") print "Yes" if "##" not in "".join(s[a+1:c]) and "##" not in "".join(s[b+1:d]):
        print("Yes")
    else: print("No") "##" not in "".join(s[a+1:c]) and "##" not in "".join(s[b+1:d]) "##" not in "".join(s[a+1:c]) "##" "".join(s[a+1:c]) "".join "" join s[a+1:c] s a+1:c a+1 a 1 c "##" not in "".join(s[b+1:d]) "##" "".join(s[b+1:d]) "".join "" join s[b+1:d] s b+1:d b+1 b 1 d print("Yes") print "Yes" b -= 1 1 b b,c,d = map(int, input().split()) map(int, input().split()) b s = list(input()) list(input()) s a -= 1 1 a c -= 1 1 c 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 d -= 1 1 d c,d = map(int, input().split()) map(int, input().split()) c d = map(int, input().split()) map(int, input().split()) d
n,a,b,c,d = map(int, input().split())
s = list(input())
s.append(".")
a -= 1
b -= 1
c -= 1
d -= 1

if c > d:
    if "##" not in "".join(s[a+1:c]) and "##" not in "".join(s[b+1:d]) and "..." in "".join(s[b-1:d+2]):
        print("Yes")
    else: print("No")
else:
    if "##" not in "".join(s[a+1:c]) and "##" not in "".join(s[b+1:d]):
        print("Yes")
    else: print("No")