import java.util.*;
import java.lang.*;
public class Main{
    public static void main(String args[]){
        str ans=new str();
        ans.sp();
    }
}
class str{
    String s;
    void sp(){
        Scanner sc=new Scanner(System.in);
        s=sc.nextLine();
        if(s.contains("A")&&s.contains("B")){
            System.out.println("Yes");
        }
        else System.out.println("No");
    }
} import java.util.*; util.* java import java.lang.*; lang.* java public class Main{
    public static void main(String args[]){
        str ans=new str();
        ans.sp();
    }
} Main public static void main(String args[]){
        str ans=new str();
        ans.sp();
    } main {
        str ans=new str();
        ans.sp();
    } str ans=new str(); ans new str() ans.sp() ans.sp ans String args[] args class str{
    String s;
    void sp(){
        Scanner sc=new Scanner(System.in);
        s=sc.nextLine();
        if(s.contains("A")&&s.contains("B")){
            System.out.println("Yes");
        }
        else System.out.println("No");
    }
} str String s; s void sp(){
        Scanner sc=new Scanner(System.in);
        s=sc.nextLine();
        if(s.contains("A")&&s.contains("B")){
            System.out.println("Yes");
        }
        else System.out.println("No");
    } sp {
        Scanner sc=new Scanner(System.in);
        s=sc.nextLine();
        if(s.contains("A")&&s.contains("B")){
            System.out.println("Yes");
        }
        else System.out.println("No");
    } Scanner sc=new Scanner(System.in); sc new Scanner(System.in) s=sc.nextLine() s sc.nextLine() sc.nextLine sc if(s.contains("A")&&s.contains("B")){
            System.out.println("Yes");
        }
        else System.out.println("No"); s.contains("A")&&s.contains("B") s.contains("A") s.contains s "A" s.contains("B") s.contains s "B" {
            System.out.println("Yes");
        } 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" public class Main{
    public static void main(String args[]){
        str ans=new str();
        ans.sp();
    }
} public class Main{
    public static void main(String args[]){
        str ans=new str();
        ans.sp();
    }
} Main
import java.util.*;
import java.lang.*;
public class Main{
    public static void main(String args[]){
        str ans=new str();
        ans.sp();
    }
}
class str{
    String s;
    void sp(){
        Scanner sc=new Scanner(System.in);
        s=sc.nextLine();
        if(s.contains("A")&&s.contains("B")){
            System.out.println("Yes");
        }
        else System.out.println("No");
    }
}
