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