import java.util.*;

class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String S = sc.next();
        boolean flgA = false;
        boolean flgB = false;

        if (S.indexOf('A') != -1)
            flgA = true;
        if (S.indexOf('B') != -1)
            flgB = true;

        if (flgA && flgB)
            System.out.println("Yes");
        else
            System.out.println("No");
    }
} import java.util.*; util.* java class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String S = sc.next();
        boolean flgA = false;
        boolean flgB = false;

        if (S.indexOf('A') != -1)
            flgA = true;
        if (S.indexOf('B') != -1)
            flgB = true;

        if (flgA && flgB)
            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();
        boolean flgA = false;
        boolean flgB = false;

        if (S.indexOf('A') != -1)
            flgA = true;
        if (S.indexOf('B') != -1)
            flgB = true;

        if (flgA && flgB)
            System.out.println("Yes");
        else
            System.out.println("No");
    } main {
        Scanner sc = new Scanner(System.in);
        String S = sc.next();
        boolean flgA = false;
        boolean flgB = false;

        if (S.indexOf('A') != -1)
            flgA = true;
        if (S.indexOf('B') != -1)
            flgB = true;

        if (flgA && flgB)
            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 boolean flgA = false; flgA false boolean flgB = false; flgB false if (S.indexOf('A') != -1)
            flgA = true; S.indexOf('A') != -1 S.indexOf('A') S.indexOf S 'A' -1 1 flgA = true flgA true if (S.indexOf('B') != -1)
            flgB = true; S.indexOf('B') != -1 S.indexOf('B') S.indexOf S 'B' -1 1 flgB = true flgB true if (flgA && flgB)
            System.out.println("Yes");
        else
            System.out.println("No"); flgA && flgB flgA flgB 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" String[] args args
import java.util.*;

class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String S = sc.next();
        boolean flgA = false;
        boolean flgB = false;

        if (S.indexOf('A') != -1)
            flgA = true;
        if (S.indexOf('B') != -1)
            flgB = true;

        if (flgA && flgB)
            System.out.println("Yes");
        else
            System.out.println("No");
    }
}
