import java.util.Scanner;

public class Main {

  public static void main(String[] args ){

    Scanner sc = new Scanner(System.in);

    String S = sc.next();
    boolean containsA = S.contains("A");
    boolean containsB = S.contains("B");

    System.out.println((containsA && containsB) ? "Yes" : "No");
  }
} 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();
    boolean containsA = S.contains("A");
    boolean containsB = S.contains("B");

    System.out.println((containsA && containsB) ? "Yes" : "No");
  }
} Main public static void main(String[] args ){

    Scanner sc = new Scanner(System.in);

    String S = sc.next();
    boolean containsA = S.contains("A");
    boolean containsB = S.contains("B");

    System.out.println((containsA && containsB) ? "Yes" : "No");
  } main {

    Scanner sc = new Scanner(System.in);

    String S = sc.next();
    boolean containsA = S.contains("A");
    boolean containsB = S.contains("B");

    System.out.println((containsA && containsB) ? "Yes" : "No");
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String S = sc.next(); S sc.next() sc.next sc boolean containsA = S.contains("A"); containsA S.contains("A") S.contains S "A" boolean containsB = S.contains("B"); containsB S.contains("B") S.contains S "B" System.out.println((containsA && containsB) ? "Yes" : "No") System.out.println System.out System System.out (containsA && containsB) ? "Yes" : "No" (containsA && containsB) containsA containsB "Yes" "No" String[] args args public class Main {

  public static void main(String[] args ){

    Scanner sc = new Scanner(System.in);

    String S = sc.next();
    boolean containsA = S.contains("A");
    boolean containsB = S.contains("B");

    System.out.println((containsA && containsB) ? "Yes" : "No");
  }
} public class Main {

  public static void main(String[] args ){

    Scanner sc = new Scanner(System.in);

    String S = sc.next();
    boolean containsA = S.contains("A");
    boolean containsB = S.contains("B");

    System.out.println((containsA && containsB) ? "Yes" : "No");
  }
} Main
import java.util.Scanner;

public class Main {

  public static void main(String[] args ){

    Scanner sc = new Scanner(System.in);

    String S = sc.next();
    boolean containsA = S.contains("A");
    boolean containsB = S.contains("B");

    System.out.println((containsA && containsB) ? "Yes" : "No");
  }
}
