import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		String S;
		Scanner sc = new Scanner(System.in);
		S = sc.next();
		if (S.indexOf("A") != -1 && S.indexOf("B") != -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) {
		String S;
		Scanner sc = new Scanner(System.in);
		S = sc.next();
		if (S.indexOf("A") != -1 && S.indexOf("B") != -1)
			System.out.println("Yes");
		else
			System.out.println("No");
		sc.close();
	}
} Main public static void main(String[] args) {
		String S;
		Scanner sc = new Scanner(System.in);
		S = sc.next();
		if (S.indexOf("A") != -1 && S.indexOf("B") != -1)
			System.out.println("Yes");
		else
			System.out.println("No");
		sc.close();
	} main {
		String S;
		Scanner sc = new Scanner(System.in);
		S = sc.next();
		if (S.indexOf("A") != -1 && S.indexOf("B") != -1)
			System.out.println("Yes");
		else
			System.out.println("No");
		sc.close();
	} String S; S Scanner sc = new Scanner(System.in); sc new Scanner(System.in) S = sc.next() S sc.next() sc.next sc if (S.indexOf("A") != -1 && S.indexOf("B") != -1)
			System.out.println("Yes");
		else
			System.out.println("No"); S.indexOf("A") != -1 && S.indexOf("B") != -1 S.indexOf("A") != -1 S.indexOf("A") S.indexOf S "A" -1 1 S.indexOf("B") != -1 S.indexOf("B") S.indexOf S "B" -1 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) {
		String S;
		Scanner sc = new Scanner(System.in);
		S = sc.next();
		if (S.indexOf("A") != -1 && S.indexOf("B") != -1)
			System.out.println("Yes");
		else
			System.out.println("No");
		sc.close();
	}
} public class Main {

	public static void main(String[] args) {
		String S;
		Scanner sc = new Scanner(System.in);
		S = sc.next();
		if (S.indexOf("A") != -1 && S.indexOf("B") != -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) {
		String S;
		Scanner sc = new Scanner(System.in);
		S = sc.next();
		if (S.indexOf("A") != -1 && S.indexOf("B") != -1)
			System.out.println("Yes");
		else
			System.out.println("No");
		sc.close();
	}
}