

import java.util.Scanner;

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

		Scanner scan = new Scanner(System.in);

		String S = scan.next();

		String anser = "No";

		if(S.contains("A") && S.contains("B")) {
			anser = "Yes";
		}
		System.out.println(anser);
	}

} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);

		String S = scan.next();

		String anser = "No";

		if(S.contains("A") && S.contains("B")) {
			anser = "Yes";
		}
		System.out.println(anser);
	}

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

		Scanner scan = new Scanner(System.in);

		String S = scan.next();

		String anser = "No";

		if(S.contains("A") && S.contains("B")) {
			anser = "Yes";
		}
		System.out.println(anser);
	} main {

		Scanner scan = new Scanner(System.in);

		String S = scan.next();

		String anser = "No";

		if(S.contains("A") && S.contains("B")) {
			anser = "Yes";
		}
		System.out.println(anser);
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) String S = scan.next(); S scan.next() scan.next scan String anser = "No"; anser "No" if(S.contains("A") && S.contains("B")) {
			anser = "Yes";
		} S.contains("A") && S.contains("B") S.contains("A") S.contains S "A" S.contains("B") S.contains S "B" {
			anser = "Yes";
		} anser = "Yes" anser "Yes" System.out.println(anser) System.out.println System.out System System.out anser String[] args args public class Main {
	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);

		String S = scan.next();

		String anser = "No";

		if(S.contains("A") && S.contains("B")) {
			anser = "Yes";
		}
		System.out.println(anser);
	}

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

		Scanner scan = new Scanner(System.in);

		String S = scan.next();

		String anser = "No";

		if(S.contains("A") && S.contains("B")) {
			anser = "Yes";
		}
		System.out.println(anser);
	}

} Main


import java.util.Scanner;

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

		Scanner scan = new Scanner(System.in);

		String S = scan.next();

		String anser = "No";

		if(S.contains("A") && S.contains("B")) {
			anser = "Yes";
		}
		System.out.println(anser);
	}

}
