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

if a > b and c > d or a < b and c < d:
  if s[a - 1:c].count('##') + s[b - 1:d].count('##') == 0:
    print('Yes')
  else:
    print('No')
else:
  i, j = (b, d) if a < b else (a, c)
  if any(s[k - 1] == s[k] == s[k + 1] == '.' for k in range(i - 1, j)):
    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 = input() s input() input if a > b and c > d or a < b and c < d:
  if s[a - 1:c].count('##') + s[b - 1:d].count('##') == 0:
    print('Yes')
  else:
    print('No')
else:
  i, j = (b, d) if a < b else (a, c)
  if any(s[k - 1] == s[k] == s[k + 1] == '.' for k in range(i - 1, j)):
    print('Yes')
  else:
    print('No') a > b and c > d or a < b and c < d a > b and c > d a > b a b c > d c d a < b and c < d a < b a b c < d c d if s[a - 1:c].count('##') + s[b - 1:d].count('##') == 0:
    print('Yes')
  else:
    print('No') s[a - 1:c].count('##') + s[b - 1:d].count('##') == 0 s[a - 1:c].count('##') + s[b - 1:d].count('##') s[a - 1:c].count('##') [a - 1:c].count [a - 1:c] s a - 1:c a - 1 a 1 c count '##' s[b - 1:d].count('##') [b - 1:d].count [b - 1:d] s b - 1:d b - 1 b 1 d count '##' 0 print('Yes') print 'Yes' print('No') print 'No' i, j = (b, d) if a < b else (a, c) i (b, d) if a < b else (a, c) a < b a b (b, d) b d (a, c) a c j if any(s[k - 1] == s[k] == s[k + 1] == '.' for k in range(i - 1, j)):
    print('Yes')
  else:
    print('No') any(s[k - 1] == s[k] == s[k + 1] == '.' for k in range(i - 1, j)) any s[k - 1] == s[k] == s[k + 1] == '.' s[k - 1] == s[k] == s[k + 1] s[k - 1] == s[k] s[k - 1] s k - 1 k 1 s[k] s k s[k + 1] s k + 1 k 1 '.' print('Yes') print 'Yes' print('No') print 'No' n, a, b, c, d = map(int, input().split()) map(int, input().split()) n d = map(int, input().split()) map(int, input().split()) d a, b, c, d = map(int, input().split()) map(int, input().split()) a i, j = (b, d) if a < b else (a, c) (b, d) if a < b else (a, c) i b, c, d = map(int, input().split()) map(int, input().split()) b s = input() input() s c, d = map(int, input().split()) map(int, input().split()) c j = (b, d) if a < b else (a, c) (b, d) if a < b else (a, c) j
n, a, b, c, d = map(int, input().split())
s = input()

if a > b and c > d or a < b and c < d:
  if s[a - 1:c].count('##') + s[b - 1:d].count('##') == 0:
    print('Yes')
  else:
    print('No')
else:
  i, j = (b, d) if a < b else (a, c)
  if any(s[k - 1] == s[k] == s[k + 1] == '.' for k in range(i - 1, j)):
    print('Yes')
  else:
    print('No')