import java.util.Scanner;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String S = sc.next();
    switch (S) {
      case "AAA":
      case "BBB":
        System.out.println("No");
        break;
      case "AAB":
      case "ABA":
      case "BAA":  
      case "BBA":
      case "BAB":
      case "ABB":
        System.out.println("Yes");
        break;
    }
  }
} import java.util.Scanner; Scanner java.util public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String S = sc.next();
    switch (S) {
      case "AAA":
      case "BBB":
        System.out.println("No");
        break;
      case "AAB":
      case "ABA":
      case "BAA":  
      case "BBA":
      case "BAB":
      case "ABB":
        System.out.println("Yes");
        break;
    }
  }
} Main public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String S = sc.next();
    switch (S) {
      case "AAA":
      case "BBB":
        System.out.println("No");
        break;
      case "AAB":
      case "ABA":
      case "BAA":  
      case "BBA":
      case "BAB":
      case "ABB":
        System.out.println("Yes");
        break;
    }
  } main {
    Scanner sc = new Scanner(System.in);
    String S = sc.next();
    switch (S) {
      case "AAA":
      case "BBB":
        System.out.println("No");
        break;
      case "AAB":
      case "ABA":
      case "BAA":  
      case "BBA":
      case "BAB":
      case "ABB":
        System.out.println("Yes");
        break;
    }
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String S = sc.next(); S sc.next() sc.next sc switch (S) {
      case "AAA":
      case "BBB":
        System.out.println("No");
        break;
      case "AAB":
      case "ABA":
      case "BAA":  
      case "BBA":
      case "BAB":
      case "ABB":
        System.out.println("Yes");
        break;
    } S case "AAA": "AAA" case "AAA": case "BBB": "BBB" case "BBB": System.out.println("No") System.out.println System.out System System.out "No" break; case "AAB": "AAB" case "AAB": case "ABA": "ABA" case "ABA": case "BAA": "BAA" case "BAA": case "BBA": "BBA" case "BBA": case "BAB": "BAB" case "BAB": case "ABB": "ABB" case "ABB": System.out.println("Yes") System.out.println System.out System System.out "Yes" break; String[] args args public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String S = sc.next();
    switch (S) {
      case "AAA":
      case "BBB":
        System.out.println("No");
        break;
      case "AAB":
      case "ABA":
      case "BAA":  
      case "BBA":
      case "BAB":
      case "ABB":
        System.out.println("Yes");
        break;
    }
  }
} public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String S = sc.next();
    switch (S) {
      case "AAA":
      case "BBB":
        System.out.println("No");
        break;
      case "AAB":
      case "ABA":
      case "BAA":  
      case "BBA":
      case "BAB":
      case "ABB":
        System.out.println("Yes");
        break;
    }
  }
} Main
import java.util.Scanner;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String S = sc.next();
    switch (S) {
      case "AAA":
      case "BBB":
        System.out.println("No");
        break;
      case "AAB":
      case "ABA":
      case "BAA":  
      case "BBA":
      case "BAB":
      case "ABB":
        System.out.println("Yes");
        break;
    }
  }
}