import java.util.*;
public class Main {
public static void main(String[] args){
	Scanner sc = new Scanner(System.in);
	String str = sc.next();
  	int len = str.length();
  	char[] c = new char[len];
	char c1 = str.charAt(0);
  	char c2 = str.charAt(1);
  	char c3 = str.charAt(2);
  	
  	if((c1=='A')&&(c2=='A')&&(c3=='A')){
      System.out.println("No");
    }else if((c1=='B')&&(c2=='B')&&(c3=='B')){
      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 str = sc.next();
  	int len = str.length();
  	char[] c = new char[len];
	char c1 = str.charAt(0);
  	char c2 = str.charAt(1);
  	char c3 = str.charAt(2);
  	
  	if((c1=='A')&&(c2=='A')&&(c3=='A')){
      System.out.println("No");
    }else if((c1=='B')&&(c2=='B')&&(c3=='B')){
      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();
  	int len = str.length();
  	char[] c = new char[len];
	char c1 = str.charAt(0);
  	char c2 = str.charAt(1);
  	char c3 = str.charAt(2);
  	
  	if((c1=='A')&&(c2=='A')&&(c3=='A')){
      System.out.println("No");
    }else if((c1=='B')&&(c2=='B')&&(c3=='B')){
      System.out.println("No");
    }else{
      System.out.println("Yes");
    }
	} main {
	Scanner sc = new Scanner(System.in);
	String str = sc.next();
  	int len = str.length();
  	char[] c = new char[len];
	char c1 = str.charAt(0);
  	char c2 = str.charAt(1);
  	char c3 = str.charAt(2);
  	
  	if((c1=='A')&&(c2=='A')&&(c3=='A')){
      System.out.println("No");
    }else if((c1=='B')&&(c2=='B')&&(c3=='B')){
      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 int len = str.length(); len str.length() str.length str char[] c = new char[len]; c new char[len] len char c1 = str.charAt(0); c1 str.charAt(0) str.charAt str 0 char c2 = str.charAt(1); c2 str.charAt(1) str.charAt str 1 char c3 = str.charAt(2); c3 str.charAt(2) str.charAt str 2 if((c1=='A')&&(c2=='A')&&(c3=='A')){
      System.out.println("No");
    }else if((c1=='B')&&(c2=='B')&&(c3=='B')){
      System.out.println("No");
    }else{
      System.out.println("Yes");
    } (c1=='A')&&(c2=='A')&&(c3=='A') (c1=='A')&&(c2=='A')&&(c3=='A') (c1=='A') c1 'A' (c2=='A') c2 'A' (c3=='A') c3 'A' {
      System.out.println("No");
    } System.out.println("No") System.out.println System.out System System.out "No" if((c1=='B')&&(c2=='B')&&(c3=='B')){
      System.out.println("No");
    }else{
      System.out.println("Yes");
    } (c1=='B')&&(c2=='B')&&(c3=='B') (c1=='B')&&(c2=='B')&&(c3=='B') (c1=='B') c1 'B' (c2=='B') c2 'B' (c3=='B') c3 'B' {
      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();
  	int len = str.length();
  	char[] c = new char[len];
	char c1 = str.charAt(0);
  	char c2 = str.charAt(1);
  	char c3 = str.charAt(2);
  	
  	if((c1=='A')&&(c2=='A')&&(c3=='A')){
      System.out.println("No");
    }else if((c1=='B')&&(c2=='B')&&(c3=='B')){
      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();
  	int len = str.length();
  	char[] c = new char[len];
	char c1 = str.charAt(0);
  	char c2 = str.charAt(1);
  	char c3 = str.charAt(2);
  	
  	if((c1=='A')&&(c2=='A')&&(c3=='A')){
      System.out.println("No");
    }else if((c1=='B')&&(c2=='B')&&(c3=='B')){
      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 str = sc.next();
  	int len = str.length();
  	char[] c = new char[len];
	char c1 = str.charAt(0);
  	char c2 = str.charAt(1);
  	char c3 = str.charAt(2);
  	
  	if((c1=='A')&&(c2=='A')&&(c3=='A')){
      System.out.println("No");
    }else if((c1=='B')&&(c2=='B')&&(c3=='B')){
      System.out.println("No");
    }else{
      System.out.println("Yes");
    }
	}
}