import java.util.Scanner;

public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String S = sc.next();
        int a = 0;
        int b = 0;
        for (int i = 0 ; i < S.length(); i++){
            if (S.charAt(i) == 'A')
                a ++;
            else
                b ++;
        }
        System.out.println(a > 0 && b > 0 ? "Yes" : "No");
        sc.close();
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String S = sc.next();
        int a = 0;
        int b = 0;
        for (int i = 0 ; i < S.length(); i++){
            if (S.charAt(i) == 'A')
                a ++;
            else
                b ++;
        }
        System.out.println(a > 0 && b > 0 ? "Yes" : "No");
        sc.close();
    }
} Main public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String S = sc.next();
        int a = 0;
        int b = 0;
        for (int i = 0 ; i < S.length(); i++){
            if (S.charAt(i) == 'A')
                a ++;
            else
                b ++;
        }
        System.out.println(a > 0 && b > 0 ? "Yes" : "No");
        sc.close();
    } main {
        Scanner sc = new Scanner(System.in);
        String S = sc.next();
        int a = 0;
        int b = 0;
        for (int i = 0 ; i < S.length(); i++){
            if (S.charAt(i) == 'A')
                a ++;
            else
                b ++;
        }
        System.out.println(a > 0 && b > 0 ? "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 int a = 0; a 0 int b = 0; b 0 for (int i = 0 ; i < S.length(); i++){
            if (S.charAt(i) == 'A')
                a ++;
            else
                b ++;
        } int i = 0 ; int i = 0 ; i 0 i < S.length() i S.length() S.length S i++ i++ i {
            if (S.charAt(i) == 'A')
                a ++;
            else
                b ++;
        } {
            if (S.charAt(i) == 'A')
                a ++;
            else
                b ++;
        } if (S.charAt(i) == 'A')
                a ++;
            else
                b ++; S.charAt(i) == 'A' S.charAt(i) S.charAt S i 'A' a ++ a b ++ b System.out.println(a > 0 && b > 0 ? "Yes" : "No") System.out.println System.out System System.out a > 0 && b > 0 ? "Yes" : "No" a > 0 && b > 0 a > 0 a 0 b > 0 b 0 "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();
        int a = 0;
        int b = 0;
        for (int i = 0 ; i < S.length(); i++){
            if (S.charAt(i) == 'A')
                a ++;
            else
                b ++;
        }
        System.out.println(a > 0 && b > 0 ? "Yes" : "No");
        sc.close();
    }
} public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String S = sc.next();
        int a = 0;
        int b = 0;
        for (int i = 0 ; i < S.length(); i++){
            if (S.charAt(i) == 'A')
                a ++;
            else
                b ++;
        }
        System.out.println(a > 0 && b > 0 ? "Yes" : "No");
        sc.close();
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String S = sc.next();
        int a = 0;
        int b = 0;
        for (int i = 0 ; i < S.length(); i++){
            if (S.charAt(i) == 'A')
                a ++;
            else
                b ++;
        }
        System.out.println(a > 0 && b > 0 ? "Yes" : "No");
        sc.close();
    }
}
