import java.util.*;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        boolean a = s.indexOf("A") > -1;
        boolean b = s.indexOf("B") > -1;
        System.out.println(a&b ? "Yes" : "No");
        sc.close();

    }

} import java.util.*; util.* java public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        boolean a = s.indexOf("A") > -1;
        boolean b = s.indexOf("B") > -1;
        System.out.println(a&b ? "Yes" : "No");
        sc.close();

    }

} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        boolean a = s.indexOf("A") > -1;
        boolean b = s.indexOf("B") > -1;
        System.out.println(a&b ? "Yes" : "No");
        sc.close();

    } main {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        boolean a = s.indexOf("A") > -1;
        boolean b = s.indexOf("B") > -1;
        System.out.println(a&b ? "Yes" : "No");
        sc.close();

    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc boolean a = s.indexOf("A") > -1; a s.indexOf("A") > -1 s.indexOf("A") s.indexOf s "A" -1 1 boolean b = s.indexOf("B") > -1; b s.indexOf("B") > -1 s.indexOf("B") s.indexOf s "B" -1 1 System.out.println(a&b ? "Yes" : "No") System.out.println System.out System System.out a&b ? "Yes" : "No" a&b a b "Yes" "No" sc.close() sc.close sc String[] args args public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        boolean a = s.indexOf("A") > -1;
        boolean b = s.indexOf("B") > -1;
        System.out.println(a&b ? "Yes" : "No");
        sc.close();

    }

} public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        boolean a = s.indexOf("A") > -1;
        boolean b = s.indexOf("B") > -1;
        System.out.println(a&b ? "Yes" : "No");
        sc.close();

    }

} Main
import java.util.*;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        boolean a = s.indexOf("A") > -1;
        boolean b = s.indexOf("B") > -1;
        System.out.println(a&b ? "Yes" : "No");
        sc.close();

    }

}
