import java.util.Scanner;

public class Main {
	public static void main(String[] args){
		Scanner stdIn = new Scanner(System.in);
		String S = stdIn.next();
		int ansA = 0;
		int ansB = 0;
		for(int a = 0; a < S.length(); a++){
			if(S.charAt(a) == 'A'){
				ansA++;
			}
			else{
				ansB++;
			}
		}
		if(ansA == 3){
			System.out.println("No");
		}
		else if(ansB == 3){
			System.out.println("No");
		}
		else{
			System.out.println("Yes");
		}
		stdIn.close();
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args){
		Scanner stdIn = new Scanner(System.in);
		String S = stdIn.next();
		int ansA = 0;
		int ansB = 0;
		for(int a = 0; a < S.length(); a++){
			if(S.charAt(a) == 'A'){
				ansA++;
			}
			else{
				ansB++;
			}
		}
		if(ansA == 3){
			System.out.println("No");
		}
		else if(ansB == 3){
			System.out.println("No");
		}
		else{
			System.out.println("Yes");
		}
		stdIn.close();
	}
} Main public static void main(String[] args){
		Scanner stdIn = new Scanner(System.in);
		String S = stdIn.next();
		int ansA = 0;
		int ansB = 0;
		for(int a = 0; a < S.length(); a++){
			if(S.charAt(a) == 'A'){
				ansA++;
			}
			else{
				ansB++;
			}
		}
		if(ansA == 3){
			System.out.println("No");
		}
		else if(ansB == 3){
			System.out.println("No");
		}
		else{
			System.out.println("Yes");
		}
		stdIn.close();
	} main {
		Scanner stdIn = new Scanner(System.in);
		String S = stdIn.next();
		int ansA = 0;
		int ansB = 0;
		for(int a = 0; a < S.length(); a++){
			if(S.charAt(a) == 'A'){
				ansA++;
			}
			else{
				ansB++;
			}
		}
		if(ansA == 3){
			System.out.println("No");
		}
		else if(ansB == 3){
			System.out.println("No");
		}
		else{
			System.out.println("Yes");
		}
		stdIn.close();
	} Scanner stdIn = new Scanner(System.in); stdIn new Scanner(System.in) String S = stdIn.next(); S stdIn.next() stdIn.next stdIn int ansA = 0; ansA 0 int ansB = 0; ansB 0 for(int a = 0; a < S.length(); a++){
			if(S.charAt(a) == 'A'){
				ansA++;
			}
			else{
				ansB++;
			}
		} int a = 0; int a = 0; a 0 a < S.length() a S.length() S.length S a++ a++ a {
			if(S.charAt(a) == 'A'){
				ansA++;
			}
			else{
				ansB++;
			}
		} {
			if(S.charAt(a) == 'A'){
				ansA++;
			}
			else{
				ansB++;
			}
		} if(S.charAt(a) == 'A'){
				ansA++;
			}
			else{
				ansB++;
			} S.charAt(a) == 'A' S.charAt(a) S.charAt S a 'A' {
				ansA++;
			} ansA++ ansA {
				ansB++;
			} ansB++ ansB if(ansA == 3){
			System.out.println("No");
		}
		else if(ansB == 3){
			System.out.println("No");
		}
		else{
			System.out.println("Yes");
		} ansA == 3 ansA 3 {
			System.out.println("No");
		} System.out.println("No") System.out.println System.out System System.out "No" if(ansB == 3){
			System.out.println("No");
		}
		else{
			System.out.println("Yes");
		} ansB == 3 ansB 3 {
			System.out.println("No");
		} System.out.println("No") System.out.println System.out System System.out "No" {
			System.out.println("Yes");
		} System.out.println("Yes") System.out.println System.out System System.out "Yes" stdIn.close() stdIn.close stdIn String[] args args public class Main {
	public static void main(String[] args){
		Scanner stdIn = new Scanner(System.in);
		String S = stdIn.next();
		int ansA = 0;
		int ansB = 0;
		for(int a = 0; a < S.length(); a++){
			if(S.charAt(a) == 'A'){
				ansA++;
			}
			else{
				ansB++;
			}
		}
		if(ansA == 3){
			System.out.println("No");
		}
		else if(ansB == 3){
			System.out.println("No");
		}
		else{
			System.out.println("Yes");
		}
		stdIn.close();
	}
} public class Main {
	public static void main(String[] args){
		Scanner stdIn = new Scanner(System.in);
		String S = stdIn.next();
		int ansA = 0;
		int ansB = 0;
		for(int a = 0; a < S.length(); a++){
			if(S.charAt(a) == 'A'){
				ansA++;
			}
			else{
				ansB++;
			}
		}
		if(ansA == 3){
			System.out.println("No");
		}
		else if(ansB == 3){
			System.out.println("No");
		}
		else{
			System.out.println("Yes");
		}
		stdIn.close();
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args){
		Scanner stdIn = new Scanner(System.in);
		String S = stdIn.next();
		int ansA = 0;
		int ansB = 0;
		for(int a = 0; a < S.length(); a++){
			if(S.charAt(a) == 'A'){
				ansA++;
			}
			else{
				ansB++;
			}
		}
		if(ansA == 3){
			System.out.println("No");
		}
		else if(ansB == 3){
			System.out.println("No");
		}
		else{
			System.out.println("Yes");
		}
		stdIn.close();
	}
}
