import std.algorithm;
import std.array;
import std.conv;
import std.math;
import std.range;
import std.stdio;
import std.string;
import std.format;

void main() {
  auto s = readln;
  int n, a, b, c, d;
  s.formattedRead (" %d %d %d %d %d", &n, &a, &b, &c, &d);
  s = readln;
  --a;
  --b;
  --c;
  --d;
  auto rock = new bool[n];
  foreach (i; 0 .. n) {
    rock[i] = s[i] == '#';
  }
  void maxBlockLength (int x, int y, out int l1, out int l2) {
    debug stderr.writeln(x, ' ', y);
    auto z = rock[x .. y + 1];
    foreach (p; z.group) {
      if (p[0]) {
        l1 = max (l1, p[1]);
      }
      if (!p[0]) {
        l2 = max (l2, p[1]);
      }
    }
  }
  bool test () {
    int p1, q1, p2, q2, p3, q3;
    maxBlockLength (a, c, p1, q1);
    maxBlockLength (b, d, p2, q2);
    if (p1 >= 2 || p2 >= 2) {
      return false;
    }
    if (c < d) {
      return true;
    }
    rock[b] = true;
    maxBlockLength (a, c, p3, q3);
    if (p3 < 2) return true;
    return q2 > 2;
  }
  writeln (test () ? "Yes" : "No");
}

