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