import java.util.ArrayList;
import java.util.Scanner;

public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String str = sc.next();

        ArrayList<Character> cha = new ArrayList<>();
        for(char c: str.toCharArray()){
            cha.add(c);
        }

        String out = new String();
        if(cha.contains('A')&&cha.contains('B')) {
            out = "Yes";
        } else {
            out = "No";
        }

        System.out.println(out);
        sc.close();
    }
} import java.util.ArrayList; ArrayList java.util import java.util.Scanner; Scanner java.util public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String str = sc.next();

        ArrayList<Character> cha = new ArrayList<>();
        for(char c: str.toCharArray()){
            cha.add(c);
        }

        String out = new String();
        if(cha.contains('A')&&cha.contains('B')) {
            out = "Yes";
        } else {
            out = "No";
        }

        System.out.println(out);
        sc.close();
    }
} Main public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String str = sc.next();

        ArrayList<Character> cha = new ArrayList<>();
        for(char c: str.toCharArray()){
            cha.add(c);
        }

        String out = new String();
        if(cha.contains('A')&&cha.contains('B')) {
            out = "Yes";
        } else {
            out = "No";
        }

        System.out.println(out);
        sc.close();
    } main {
        Scanner sc = new Scanner(System.in);
        String str = sc.next();

        ArrayList<Character> cha = new ArrayList<>();
        for(char c: str.toCharArray()){
            cha.add(c);
        }

        String out = new String();
        if(cha.contains('A')&&cha.contains('B')) {
            out = "Yes";
        } else {
            out = "No";
        }

        System.out.println(out);
        sc.close();
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String str = sc.next(); str sc.next() sc.next sc ArrayList<Character> cha = new ArrayList<>(); cha new ArrayList<>() for(char c: str.toCharArray()){
            cha.add(c);
        } char c str.toCharArray() str.toCharArray str {
            cha.add(c);
        } {
            cha.add(c);
        } cha.add(c) cha.add cha c String out = new String(); out new String() if(cha.contains('A')&&cha.contains('B')) {
            out = "Yes";
        } else {
            out = "No";
        } cha.contains('A')&&cha.contains('B') cha.contains('A') cha.contains cha 'A' cha.contains('B') cha.contains cha 'B' {
            out = "Yes";
        } out = "Yes" out "Yes" {
            out = "No";
        } out = "No" out "No" System.out.println(out) System.out.println System.out System System.out out sc.close() sc.close sc String[] args args public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String str = sc.next();

        ArrayList<Character> cha = new ArrayList<>();
        for(char c: str.toCharArray()){
            cha.add(c);
        }

        String out = new String();
        if(cha.contains('A')&&cha.contains('B')) {
            out = "Yes";
        } else {
            out = "No";
        }

        System.out.println(out);
        sc.close();
    }
} public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String str = sc.next();

        ArrayList<Character> cha = new ArrayList<>();
        for(char c: str.toCharArray()){
            cha.add(c);
        }

        String out = new String();
        if(cha.contains('A')&&cha.contains('B')) {
            out = "Yes";
        } else {
            out = "No";
        }

        System.out.println(out);
        sc.close();
    }
} Main
import java.util.ArrayList;
import java.util.Scanner;

public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String str = sc.next();

        ArrayList<Character> cha = new ArrayList<>();
        for(char c: str.toCharArray()){
            cha.add(c);
        }

        String out = new String();
        if(cha.contains('A')&&cha.contains('B')) {
            out = "Yes";
        } else {
            out = "No";
        }

        System.out.println(out);
        sc.close();
    }
}