// package app;
import java.util.*;

public class Main {
    public static void main(String[] args) {    
        Scanner sc = new Scanner(System.in);
        String str = sc.next();
        sc.close();
        
        if (str.contains("A") && str.contains("B")){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }
        System.exit(0);
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) {    
        Scanner sc = new Scanner(System.in);
        String str = sc.next();
        sc.close();
        
        if (str.contains("A") && str.contains("B")){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }
        System.exit(0);
    }
} Main public static void main(String[] args) {    
        Scanner sc = new Scanner(System.in);
        String str = sc.next();
        sc.close();
        
        if (str.contains("A") && str.contains("B")){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }
        System.exit(0);
    } main {    
        Scanner sc = new Scanner(System.in);
        String str = sc.next();
        sc.close();
        
        if (str.contains("A") && str.contains("B")){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }
        System.exit(0);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String str = sc.next(); str sc.next() sc.next sc sc.close() sc.close sc if (str.contains("A") && str.contains("B")){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        } str.contains("A") && str.contains("B") str.contains("A") str.contains str "A" str.contains("B") str.contains str "B" {
            System.out.println("Yes");
        } System.out.println("Yes") System.out.println System.out System System.out "Yes" {
            System.out.println("No");
        } System.out.println("No") System.out.println System.out System System.out "No" System.exit(0) System.exit System 0 String[] args args public class Main {
    public static void main(String[] args) {    
        Scanner sc = new Scanner(System.in);
        String str = sc.next();
        sc.close();
        
        if (str.contains("A") && str.contains("B")){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }
        System.exit(0);
    }
} public class Main {
    public static void main(String[] args) {    
        Scanner sc = new Scanner(System.in);
        String str = sc.next();
        sc.close();
        
        if (str.contains("A") && str.contains("B")){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }
        System.exit(0);
    }
} Main
// package app;
import java.util.*;

public class Main {
    public static void main(String[] args) {    
        Scanner sc = new Scanner(System.in);
        String str = sc.next();
        sc.close();
        
        if (str.contains("A") && str.contains("B")){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }
        System.exit(0);
    }
}