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