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

# 2個以上の岩があればNG
if "##" in s[a:max(c,d)]:
    print("No")
    exit()

# AがBを抜けるかどうか
if d < c and not "..." in s[b-1:d+2]:
    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 a -= 1 a 1 b -= 1 b 1 c -= 1 c 1 d -= 1 d 1 if "##" in s[a:max(c,d)]:
    print("No")
    exit()

# AがBを抜けるかどうか "##" in s[a:max(c,d)] "##" s[a:max(c,d)] s a:max(c,d) a max(c,d) max c d print("No") print "No" exit() exit if d < c and not "..." in s[b-1:d+2]:
    print("No")
    exit() d < c and not "..." in s[b-1:d+2] d < c d c not "..." in s[b-1:d+2] "..." in s[b-1:d+2] "..." s[b-1:d+2] s b-1:d+2 b-1 b 1 d+2 d 2 print("No") print "No" exit() exit print("Yes") print "Yes" d -= 1 1 d c, d = map(int, input().split()) map(int, input().split()) c a, b, c, d = map(int, input().split()) map(int, input().split()) a b, c, d = map(int, input().split()) map(int, input().split()) b c -= 1 1 c n, a, b, c, d = map(int, input().split()) map(int, input().split()) n d = map(int, input().split()) map(int, input().split()) d s = input() input() s a -= 1 1 a b -= 1 1 b
n, a, b, c, d = map(int, input().split())
s = input()
a -= 1
b -= 1
c -= 1
d -= 1

# 2個以上の岩があればNG
if "##" in s[a:max(c,d)]:
    print("No")
    exit()

# AがBを抜けるかどうか
if d < c and not "..." in s[b-1:d+2]:
    print("No")
    exit()

print("Yes")
