/* imports all std modules {{{*/
import
  std.algorithm,
  std.array,
  std.ascii,
  std.base64,
  std.bigint,
  std.bitmanip,
  std.compiler,
  std.complex,
  std.concurrency,
  std.container,
  std.conv,
  std.csv,
  std.datetime,
  std.demangle,
  std.encoding,
  std.exception,
  std.file,
  std.format,
  std.functional,
  std.getopt,
  std.json,
  std.math,
  std.mathspecial,
  std.meta,
  std.mmfile,
  std.net.curl,
  std.net.isemail,
  std.numeric,
  std.parallelism,
  std.path,
  std.process,
  std.random,
  std.range,
  std.regex,
  std.signals,
  std.socket,
  std.stdint,
  std.stdio,
  std.string,
  std.system,
  std.traits,
  std.typecons,
  std.uni,
  std.uri,
  std.utf,
  std.uuid,
  std.variant,
  std.zip,
  std.zlib;
/*}}}*/

/+---test
7 1 3 6 7
.#..#..
---+/
/+---test
7 1 3 7 6
.#..#..
---+/
/+---test
15 1 3 15 13
...#.#...#.#...
---+/

void main(string[] args) {
  long N, A, B, C, D;
  readf(" %d %d %d %d %d ", &N, &A, &B, &C, &D);
  --A; --B; --C; --D;

  const S = readln.chomp;

  auto F(long st, long last) {
    long[] M;
    long l;
    foreach (i, s; S[st..last+1]~'|') {
      if (S[st+l] != s) {
        M ~= (i-l) * (S[st+l] == '#'? -1: 1);
        l  = i;
      }
    }
    return M;
  }

  long ans = F(A, C).all!(x => x >= -1) && F(B, D).all!(x => x >= -1);
  if (D < C) {
    ans = ans && F(B, D).any!(x => x >= 3);
  }
  (ans? "Yes": "No").writeln;
}
