
function Main(arg) 
{
  var S = arg.split("\n")[0].split("");

  if (S.length % 2 == 0) {
    var a = S.slice(0, S.length / 2 - 1);
    var b = S.slice(0, S.length / 2);

    a = new Set(a);
    b = new Set(b);
    if (a.size == 1 && b.size == 1) {
      console.log("NO");
      return;
    }
  }
  else {
    var a = S.slice(0, ((S.length-1) / 2));
    var b = S.slice(((S.length-1) / 2)+1);

    a = new Set(a);
    b = new Set(b);
    if (a.size == 1 && b.size == 1) {
      console.log("NO");
      return;
    }
  }
  console.log("YES");
  return;
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));