import java.util.Scanner;
import java.util.Arrays;
public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String a = sc.next();
		
		System.out.println(a.replace("AAA", "").length() == 0 || a.replace("BBB", "").length() == 0 ? "No" : "Yes");
	}
} import java.util.Scanner; Scanner java.util import java.util.Arrays; Arrays java.util public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String a = sc.next();
		
		System.out.println(a.replace("AAA", "").length() == 0 || a.replace("BBB", "").length() == 0 ? "No" : "Yes");
	}
} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String a = sc.next();
		
		System.out.println(a.replace("AAA", "").length() == 0 || a.replace("BBB", "").length() == 0 ? "No" : "Yes");
	} main {
		Scanner sc = new Scanner(System.in);
		String a = sc.next();
		
		System.out.println(a.replace("AAA", "").length() == 0 || a.replace("BBB", "").length() == 0 ? "No" : "Yes");
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String a = sc.next(); a sc.next() sc.next sc System.out.println(a.replace("AAA", "").length() == 0 || a.replace("BBB", "").length() == 0 ? "No" : "Yes") System.out.println System.out System System.out a.replace("AAA", "").length() == 0 || a.replace("BBB", "").length() == 0 ? "No" : "Yes" a.replace("AAA", "").length() == 0 || a.replace("BBB", "").length() == 0 a.replace("AAA", "").length() == 0 a.replace("AAA", "").length() a.replace("AAA", "").length a.replace("AAA", "") a.replace a "AAA" "" 0 a.replace("BBB", "").length() == 0 a.replace("BBB", "").length() a.replace("BBB", "").length a.replace("BBB", "") a.replace a "BBB" "" 0 "No" "Yes" String[] args args public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String a = sc.next();
		
		System.out.println(a.replace("AAA", "").length() == 0 || a.replace("BBB", "").length() == 0 ? "No" : "Yes");
	}
} public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String a = sc.next();
		
		System.out.println(a.replace("AAA", "").length() == 0 || a.replace("BBB", "").length() == 0 ? "No" : "Yes");
	}
} Main
import java.util.Scanner;
import java.util.Arrays;
public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String a = sc.next();
		
		System.out.println(a.replace("AAA", "").length() == 0 || a.replace("BBB", "").length() == 0 ? "No" : "Yes");
	}
}
