import java.util.Scanner;

public class Main{
    public static void main(String args[] ) {

        Scanner sc = new Scanner(System.in);
        
        String str = sc.nextLine();

        
        int count1 = 0;
        int count2 = 0;

        for (int i = 0; i < str.length(); i++) {

            if(str.charAt(i)=='A')
                count1++;
            if(str.charAt(i)=='B')
                count2++;

            // System.out.println(str.charAt(i));
        }
        if(count1>=1 && count2>=1)
            System.out.println("Yes");
        else
            System.out.println("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 str = sc.nextLine();

        
        int count1 = 0;
        int count2 = 0;

        for (int i = 0; i < str.length(); i++) {

            if(str.charAt(i)=='A')
                count1++;
            if(str.charAt(i)=='B')
                count2++;

            // System.out.println(str.charAt(i));
        }
        if(count1>=1 && count2>=1)
            System.out.println("Yes");
        else
            System.out.println("No");

        sc.close();
    }
} Main public static void main(String args[] ) {

        Scanner sc = new Scanner(System.in);
        
        String str = sc.nextLine();

        
        int count1 = 0;
        int count2 = 0;

        for (int i = 0; i < str.length(); i++) {

            if(str.charAt(i)=='A')
                count1++;
            if(str.charAt(i)=='B')
                count2++;

            // System.out.println(str.charAt(i));
        }
        if(count1>=1 && count2>=1)
            System.out.println("Yes");
        else
            System.out.println("No");

        sc.close();
    } main {

        Scanner sc = new Scanner(System.in);
        
        String str = sc.nextLine();

        
        int count1 = 0;
        int count2 = 0;

        for (int i = 0; i < str.length(); i++) {

            if(str.charAt(i)=='A')
                count1++;
            if(str.charAt(i)=='B')
                count2++;

            // System.out.println(str.charAt(i));
        }
        if(count1>=1 && count2>=1)
            System.out.println("Yes");
        else
            System.out.println("No");

        sc.close();
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String str = sc.nextLine(); str sc.nextLine() sc.nextLine sc int count1 = 0; count1 0 int count2 = 0; count2 0 for (int i = 0; i < str.length(); i++) {

            if(str.charAt(i)=='A')
                count1++;
            if(str.charAt(i)=='B')
                count2++;

            // System.out.println(str.charAt(i));
        } int i = 0; int i = 0; i 0 i < str.length() i str.length() str.length str i++ i++ i {

            if(str.charAt(i)=='A')
                count1++;
            if(str.charAt(i)=='B')
                count2++;

            // System.out.println(str.charAt(i));
        } {

            if(str.charAt(i)=='A')
                count1++;
            if(str.charAt(i)=='B')
                count2++;

            // System.out.println(str.charAt(i));
        } if(str.charAt(i)=='A')
                count1++; str.charAt(i)=='A' str.charAt(i) str.charAt str i 'A' count1++ count1 if(str.charAt(i)=='B')
                count2++; str.charAt(i)=='B' str.charAt(i) str.charAt str i 'B' count2++ count2 if(count1>=1 && count2>=1)
            System.out.println("Yes");
        else
            System.out.println("No"); count1>=1 && count2>=1 count1>=1 count1 1 count2>=1 count2 1 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" 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.nextLine();

        
        int count1 = 0;
        int count2 = 0;

        for (int i = 0; i < str.length(); i++) {

            if(str.charAt(i)=='A')
                count1++;
            if(str.charAt(i)=='B')
                count2++;

            // System.out.println(str.charAt(i));
        }
        if(count1>=1 && count2>=1)
            System.out.println("Yes");
        else
            System.out.println("No");

        sc.close();
    }
} public class Main{
    public static void main(String args[] ) {

        Scanner sc = new Scanner(System.in);
        
        String str = sc.nextLine();

        
        int count1 = 0;
        int count2 = 0;

        for (int i = 0; i < str.length(); i++) {

            if(str.charAt(i)=='A')
                count1++;
            if(str.charAt(i)=='B')
                count2++;

            // System.out.println(str.charAt(i));
        }
        if(count1>=1 && count2>=1)
            System.out.println("Yes");
        else
            System.out.println("No");

        sc.close();
    }
} Main
import java.util.Scanner;

public class Main{
    public static void main(String args[] ) {

        Scanner sc = new Scanner(System.in);
        
        String str = sc.nextLine();

        
        int count1 = 0;
        int count2 = 0;

        for (int i = 0; i < str.length(); i++) {

            if(str.charAt(i)=='A')
                count1++;
            if(str.charAt(i)=='B')
                count2++;

            // System.out.println(str.charAt(i));
        }
        if(count1>=1 && count2>=1)
            System.out.println("Yes");
        else
            System.out.println("No");

        sc.close();
    }
}
