import java.util.Scanner;


public class Main {


//	final int MOD = 1000000007;

//	public static long min = 2000000000;
	public static long ans = 0;

	public static void main(String[] args) {

//		int ans = 0;
		Scanner sc = new Scanner(System.in);
		boolean f = false;

//		long k = sc.nextLong();

//		int n = sc.nextInt();
		String string = sc.next();
		String[] s = string.split("");

		//-------------------------------------------------------------------------------------

		if(string.contains("A") && string.contains("B")) {
			f = true;
		}

		//-------------------------------------------------------------------------------------

		if(f) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}

//		System.out.println(ans);

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


//	final int MOD = 1000000007;

//	public static long min = 2000000000;
	public static long ans = 0;

	public static void main(String[] args) {

//		int ans = 0;
		Scanner sc = new Scanner(System.in);
		boolean f = false;

//		long k = sc.nextLong();

//		int n = sc.nextInt();
		String string = sc.next();
		String[] s = string.split("");

		//-------------------------------------------------------------------------------------

		if(string.contains("A") && string.contains("B")) {
			f = true;
		}

		//-------------------------------------------------------------------------------------

		if(f) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}

//		System.out.println(ans);

		sc.close();
	}
} Main //	public static long min = 2000000000;
	public static long ans = 0; ans 0 public static void main(String[] args) {

//		int ans = 0;
		Scanner sc = new Scanner(System.in);
		boolean f = false;

//		long k = sc.nextLong();

//		int n = sc.nextInt();
		String string = sc.next();
		String[] s = string.split("");

		//-------------------------------------------------------------------------------------

		if(string.contains("A") && string.contains("B")) {
			f = true;
		}

		//-------------------------------------------------------------------------------------

		if(f) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}

//		System.out.println(ans);

		sc.close();
	} main {

//		int ans = 0;
		Scanner sc = new Scanner(System.in);
		boolean f = false;

//		long k = sc.nextLong();

//		int n = sc.nextInt();
		String string = sc.next();
		String[] s = string.split("");

		//-------------------------------------------------------------------------------------

		if(string.contains("A") && string.contains("B")) {
			f = true;
		}

		//-------------------------------------------------------------------------------------

		if(f) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}

//		System.out.println(ans);

		sc.close();
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) boolean f = false; f false String string = sc.next(); string sc.next() sc.next sc String[] s = string.split(""); s string.split("") string.split string "" if(string.contains("A") && string.contains("B")) {
			f = true;
		} string.contains("A") && string.contains("B") string.contains("A") string.contains string "A" string.contains("B") string.contains string "B" {
			f = true;
		} f = true f true if(f) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		} f {
			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" sc.close() sc.close sc String[] args args public class Main {


//	final int MOD = 1000000007;

//	public static long min = 2000000000;
	public static long ans = 0;

	public static void main(String[] args) {

//		int ans = 0;
		Scanner sc = new Scanner(System.in);
		boolean f = false;

//		long k = sc.nextLong();

//		int n = sc.nextInt();
		String string = sc.next();
		String[] s = string.split("");

		//-------------------------------------------------------------------------------------

		if(string.contains("A") && string.contains("B")) {
			f = true;
		}

		//-------------------------------------------------------------------------------------

		if(f) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}

//		System.out.println(ans);

		sc.close();
	}
} public class Main {


//	final int MOD = 1000000007;

//	public static long min = 2000000000;
	public static long ans = 0;

	public static void main(String[] args) {

//		int ans = 0;
		Scanner sc = new Scanner(System.in);
		boolean f = false;

//		long k = sc.nextLong();

//		int n = sc.nextInt();
		String string = sc.next();
		String[] s = string.split("");

		//-------------------------------------------------------------------------------------

		if(string.contains("A") && string.contains("B")) {
			f = true;
		}

		//-------------------------------------------------------------------------------------

		if(f) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}

//		System.out.println(ans);

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


public class Main {


//	final int MOD = 1000000007;

//	public static long min = 2000000000;
	public static long ans = 0;

	public static void main(String[] args) {

//		int ans = 0;
		Scanner sc = new Scanner(System.in);
		boolean f = false;

//		long k = sc.nextLong();

//		int n = sc.nextInt();
		String string = sc.next();
		String[] s = string.split("");

		//-------------------------------------------------------------------------------------

		if(string.contains("A") && string.contains("B")) {
			f = true;
		}

		//-------------------------------------------------------------------------------------

		if(f) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}

//		System.out.println(ans);

		sc.close();
	}
}