
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.util.Scanner;

public class Main {

  public static void main(String[] args) throws FileNotFoundException {

//    Scanner cin = new Scanner(new FileReader("input.txt"));
    Scanner cin = new Scanner(System.in);
    String n = cin.next();
    int countA=0;
    int countB=0;
    for (int i=0;i<3;i++) {
      if (n.charAt(i)=='A'){
        countA++;
      }
      if (n.charAt(i)=='B')
        countB++;
    } 
    if (countA!=0&&countB!=0)
      System.out.println("Yes");
    else 
      System.out.println("No");
  }

} import java.io.FileNotFoundException; FileNotFoundException java.io import java.io.FileReader; FileReader java.io import java.util.Scanner; Scanner java.util public class Main {

  public static void main(String[] args) throws FileNotFoundException {

//    Scanner cin = new Scanner(new FileReader("input.txt"));
    Scanner cin = new Scanner(System.in);
    String n = cin.next();
    int countA=0;
    int countB=0;
    for (int i=0;i<3;i++) {
      if (n.charAt(i)=='A'){
        countA++;
      }
      if (n.charAt(i)=='B')
        countB++;
    } 
    if (countA!=0&&countB!=0)
      System.out.println("Yes");
    else 
      System.out.println("No");
  }

} Main public static void main(String[] args) throws FileNotFoundException {

//    Scanner cin = new Scanner(new FileReader("input.txt"));
    Scanner cin = new Scanner(System.in);
    String n = cin.next();
    int countA=0;
    int countB=0;
    for (int i=0;i<3;i++) {
      if (n.charAt(i)=='A'){
        countA++;
      }
      if (n.charAt(i)=='B')
        countB++;
    } 
    if (countA!=0&&countB!=0)
      System.out.println("Yes");
    else 
      System.out.println("No");
  } main {

//    Scanner cin = new Scanner(new FileReader("input.txt"));
    Scanner cin = new Scanner(System.in);
    String n = cin.next();
    int countA=0;
    int countB=0;
    for (int i=0;i<3;i++) {
      if (n.charAt(i)=='A'){
        countA++;
      }
      if (n.charAt(i)=='B')
        countB++;
    } 
    if (countA!=0&&countB!=0)
      System.out.println("Yes");
    else 
      System.out.println("No");
  } Scanner cin = new Scanner(System.in); cin new Scanner(System.in) String n = cin.next(); n cin.next() cin.next cin int countA=0; countA 0 int countB=0; countB 0 for (int i=0;i<3;i++) {
      if (n.charAt(i)=='A'){
        countA++;
      }
      if (n.charAt(i)=='B')
        countB++;
    } int i=0; int i=0; i 0 i<3 i 3 i++ i++ i {
      if (n.charAt(i)=='A'){
        countA++;
      }
      if (n.charAt(i)=='B')
        countB++;
    } {
      if (n.charAt(i)=='A'){
        countA++;
      }
      if (n.charAt(i)=='B')
        countB++;
    } if (n.charAt(i)=='A'){
        countA++;
      } n.charAt(i)=='A' n.charAt(i) n.charAt n i 'A' {
        countA++;
      } countA++ countA if (n.charAt(i)=='B')
        countB++; n.charAt(i)=='B' n.charAt(i) n.charAt n i 'B' countB++ countB if (countA!=0&&countB!=0)
      System.out.println("Yes");
    else 
      System.out.println("No"); countA!=0&&countB!=0 countA!=0 countA 0 countB!=0 countB 0 System.out.println("Yes") System.out.println System.out System System.out "Yes" System.out.println("No") System.out.println System.out System System.out "No" String[] args args public class Main {

  public static void main(String[] args) throws FileNotFoundException {

//    Scanner cin = new Scanner(new FileReader("input.txt"));
    Scanner cin = new Scanner(System.in);
    String n = cin.next();
    int countA=0;
    int countB=0;
    for (int i=0;i<3;i++) {
      if (n.charAt(i)=='A'){
        countA++;
      }
      if (n.charAt(i)=='B')
        countB++;
    } 
    if (countA!=0&&countB!=0)
      System.out.println("Yes");
    else 
      System.out.println("No");
  }

} public class Main {

  public static void main(String[] args) throws FileNotFoundException {

//    Scanner cin = new Scanner(new FileReader("input.txt"));
    Scanner cin = new Scanner(System.in);
    String n = cin.next();
    int countA=0;
    int countB=0;
    for (int i=0;i<3;i++) {
      if (n.charAt(i)=='A'){
        countA++;
      }
      if (n.charAt(i)=='B')
        countB++;
    } 
    if (countA!=0&&countB!=0)
      System.out.println("Yes");
    else 
      System.out.println("No");
  }

} Main

import java.io.FileNotFoundException;
import java.io.FileReader;
import java.util.Scanner;

public class Main {

  public static void main(String[] args) throws FileNotFoundException {

//    Scanner cin = new Scanner(new FileReader("input.txt"));
    Scanner cin = new Scanner(System.in);
    String n = cin.next();
    int countA=0;
    int countB=0;
    for (int i=0;i<3;i++) {
      if (n.charAt(i)=='A'){
        countA++;
      }
      if (n.charAt(i)=='B')
        countB++;
    } 
    if (countA!=0&&countB!=0)
      System.out.println("Yes");
    else 
      System.out.println("No");
  }

}
