import std.stdio;
import std.algorithm;
import std.math;
import std.conv;
import std.string;
import std.typecons;

T readNum(T)(){
  return readStr.to!T;
}

T[] readNums(T)(){
  return readStr.split.to!(T[]);
}

string readStr(){
  return readln.chomp;
}

int n, ss, fs, sg, fg;
bool[] map;
alias p = Tuple!(int, "s", int, "f");
p[] flag;

void main(){
  auto p = readNums!int;
  n = p[0];
  ss = p[1] - 1;
  fs = p[2] - 1;
  sg = p[3] - 1;
  fg = p[4] - 1;

  auto str = readStr;

  map = new bool[](n);
  foreach(i, c; str){
    if(c == '#') map[i] = true;
  }

  if(search(ss, fs)){
    writeln("Yes");
  } else {
    writeln("No");
  }
}

bool search(int s, int f){
  if(s == sg && f == fg){
    return true;
  }

  if(flag.canFind(p(s, f))){
    return false;
  } else {
    flag ~= p(s, f);
  }

  writeln(s, "    " , f);

  if(s+2 <= sg && !map[s+2] && f != s+2 && search(s+2, f)) return true;
  else if(s+1 <= sg && !map[s+1] && f != s+1 && search(s+1, f)) return true;

  if(f+2 <= fg && !map[f+2] && s != f+2 && search(s, f+2)) return true;
  else if(f+1 <= fg && !map[f+1] && s != f+1 && search(s, f+1)) return true;

  return false;
}
