import java.util.Scanner;

public class Main {
  	public static void main(String[] args){
      //入力値の取得
      Scanner sc = new Scanner(System.in);
      String str = sc.next();
      sc.close();

      if (str.indexOf("A") == -1 || str.indexOf("B") == -1) {
    	  System.out.println("No");
      } else {
    	  System.out.println("Yes");
      }
  	}
} import java.util.Scanner; Scanner java.util public class Main {
  	public static void main(String[] args){
      //入力値の取得
      Scanner sc = new Scanner(System.in);
      String str = sc.next();
      sc.close();

      if (str.indexOf("A") == -1 || str.indexOf("B") == -1) {
    	  System.out.println("No");
      } else {
    	  System.out.println("Yes");
      }
  	}
} Main public static void main(String[] args){
      //入力値の取得
      Scanner sc = new Scanner(System.in);
      String str = sc.next();
      sc.close();

      if (str.indexOf("A") == -1 || str.indexOf("B") == -1) {
    	  System.out.println("No");
      } else {
    	  System.out.println("Yes");
      }
  	} main {
      //入力値の取得
      Scanner sc = new Scanner(System.in);
      String str = sc.next();
      sc.close();

      if (str.indexOf("A") == -1 || str.indexOf("B") == -1) {
    	  System.out.println("No");
      } else {
    	  System.out.println("Yes");
      }
  	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String str = sc.next(); str sc.next() sc.next sc sc.close() sc.close sc if (str.indexOf("A") == -1 || str.indexOf("B") == -1) {
    	  System.out.println("No");
      } else {
    	  System.out.println("Yes");
      } str.indexOf("A") == -1 || str.indexOf("B") == -1 str.indexOf("A") == -1 str.indexOf("A") str.indexOf str "A" -1 1 str.indexOf("B") == -1 str.indexOf("B") str.indexOf str "B" -1 1 {
    	  System.out.println("No");
      } System.out.println("No") System.out.println System.out System System.out "No" {
    	  System.out.println("Yes");
      } System.out.println("Yes") System.out.println System.out System System.out "Yes" String[] args args public class Main {
  	public static void main(String[] args){
      //入力値の取得
      Scanner sc = new Scanner(System.in);
      String str = sc.next();
      sc.close();

      if (str.indexOf("A") == -1 || str.indexOf("B") == -1) {
    	  System.out.println("No");
      } else {
    	  System.out.println("Yes");
      }
  	}
} public class Main {
  	public static void main(String[] args){
      //入力値の取得
      Scanner sc = new Scanner(System.in);
      String str = sc.next();
      sc.close();

      if (str.indexOf("A") == -1 || str.indexOf("B") == -1) {
    	  System.out.println("No");
      } else {
    	  System.out.println("Yes");
      }
  	}
} Main
import java.util.Scanner;

public class Main {
  	public static void main(String[] args){
      //入力値の取得
      Scanner sc = new Scanner(System.in);
      String str = sc.next();
      sc.close();

      if (str.indexOf("A") == -1 || str.indexOf("B") == -1) {
    	  System.out.println("No");
      } else {
    	  System.out.println("Yes");
      }
  	}
}