import java.util.*;

public class Main{
  
  public static void main (String []args){
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    int a = 0;
    int b = 0;
    
    for (int i = 0; i <= 2; i++){
      if (s.charAt(i) == 'A'){
        a++;
      }else {
        b++;
      }
    }
    if (a == 3 || b ==3 ){
      System.out.println("No");
    }else{
      System.out.println("Yes");
    }
  }
}
        
      
      
       import java.util.*; util.* java public class Main{
  
  public static void main (String []args){
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    int a = 0;
    int b = 0;
    
    for (int i = 0; i <= 2; i++){
      if (s.charAt(i) == 'A'){
        a++;
      }else {
        b++;
      }
    }
    if (a == 3 || b ==3 ){
      System.out.println("No");
    }else{
      System.out.println("Yes");
    }
  }
} Main public static void main (String []args){
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    int a = 0;
    int b = 0;
    
    for (int i = 0; i <= 2; i++){
      if (s.charAt(i) == 'A'){
        a++;
      }else {
        b++;
      }
    }
    if (a == 3 || b ==3 ){
      System.out.println("No");
    }else{
      System.out.println("Yes");
    }
  } main {
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    int a = 0;
    int b = 0;
    
    for (int i = 0; i <= 2; i++){
      if (s.charAt(i) == 'A'){
        a++;
      }else {
        b++;
      }
    }
    if (a == 3 || b ==3 ){
      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 int a = 0; a 0 int b = 0; b 0 for (int i = 0; i <= 2; i++){
      if (s.charAt(i) == 'A'){
        a++;
      }else {
        b++;
      }
    } int i = 0; int i = 0; i 0 i <= 2 i 2 i++ i++ i {
      if (s.charAt(i) == 'A'){
        a++;
      }else {
        b++;
      }
    } {
      if (s.charAt(i) == 'A'){
        a++;
      }else {
        b++;
      }
    } if (s.charAt(i) == 'A'){
        a++;
      }else {
        b++;
      } s.charAt(i) == 'A' s.charAt(i) s.charAt s i 'A' {
        a++;
      } a++ a {
        b++;
      } b++ b if (a == 3 || b ==3 ){
      System.out.println("No");
    }else{
      System.out.println("Yes");
    } a == 3 || b ==3 a == 3 a 3 b ==3 b 3 {
      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 s = sc.next();
    int a = 0;
    int b = 0;
    
    for (int i = 0; i <= 2; i++){
      if (s.charAt(i) == 'A'){
        a++;
      }else {
        b++;
      }
    }
    if (a == 3 || b ==3 ){
      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 s = sc.next();
    int a = 0;
    int b = 0;
    
    for (int i = 0; i <= 2; i++){
      if (s.charAt(i) == 'A'){
        a++;
      }else {
        b++;
      }
    }
    if (a == 3 || b ==3 ){
      System.out.println("No");
    }else{
      System.out.println("Yes");
    }
  }
} Main
import java.util.*;

public class Main{
  
  public static void main (String []args){
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    int a = 0;
    int b = 0;
    
    for (int i = 0; i <= 2; i++){
      if (s.charAt(i) == 'A'){
        a++;
      }else {
        b++;
      }
    }
    if (a == 3 || b ==3 ){
      System.out.println("No");
    }else{
      System.out.println("Yes");
    }
  }
}
        
      
      
      