import java.io.*;
import java.util.*;
class Main
{
  public static void main(String ar[])
  {
    Scanner sc=new Scanner(System.in);
    String s=sc.next();
    if(s.indexOf('A')==-1 || s.indexOf('B')==-1)
      System.out.println("No");
    else
      System.out.println("Yes");
  }
} import java.io.*; io.* java import java.util.*; util.* java class Main
{
  public static void main(String ar[])
  {
    Scanner sc=new Scanner(System.in);
    String s=sc.next();
    if(s.indexOf('A')==-1 || s.indexOf('B')==-1)
      System.out.println("No");
    else
      System.out.println("Yes");
  }
} Main public static void main(String ar[])
  {
    Scanner sc=new Scanner(System.in);
    String s=sc.next();
    if(s.indexOf('A')==-1 || s.indexOf('B')==-1)
      System.out.println("No");
    else
      System.out.println("Yes");
  } main {
    Scanner sc=new Scanner(System.in);
    String s=sc.next();
    if(s.indexOf('A')==-1 || s.indexOf('B')==-1)
      System.out.println("No");
    else
      System.out.println("Yes");
  } Scanner sc=new Scanner(System.in); sc new Scanner(System.in) String s=sc.next(); s sc.next() sc.next sc if(s.indexOf('A')==-1 || s.indexOf('B')==-1)
      System.out.println("No");
    else
      System.out.println("Yes"); s.indexOf('A')==-1 || s.indexOf('B')==-1 s.indexOf('A')==-1 s.indexOf('A') s.indexOf s 'A' -1 1 s.indexOf('B')==-1 s.indexOf('B') s.indexOf s 'B' -1 1 System.out.println("No") System.out.println System.out System System.out "No" System.out.println("Yes") System.out.println System.out System System.out "Yes" String ar[] ar
import java.io.*;
import java.util.*;
class Main
{
  public static void main(String ar[])
  {
    Scanner sc=new Scanner(System.in);
    String s=sc.next();
    if(s.indexOf('A')==-1 || s.indexOf('B')==-1)
      System.out.println("No");
    else
      System.out.println("Yes");
  }
}