import java.util.*;

public class Main{
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		
		String S = scan.next();
		
		if(S.length()==3){
			char[] Si = new char[S.length()];

    		for(int i = 0; i < S.length(); i++){
            	 Si[i] = S.charAt(i);
            }

				if(Si[1]=='A' && Si[2]=='A' && Si[0]=='A'){
					System.out.println("No");
				}
				else if(Si[1]=='B' && Si[2]=='B' && Si[0]=='B'){
					System.out.println("No");
				}
				else{
					System.out.println("Yes");
				}
		}
	}
} import java.util.*; util.* java public class Main{
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		
		String S = scan.next();
		
		if(S.length()==3){
			char[] Si = new char[S.length()];

    		for(int i = 0; i < S.length(); i++){
            	 Si[i] = S.charAt(i);
            }

				if(Si[1]=='A' && Si[2]=='A' && Si[0]=='A'){
					System.out.println("No");
				}
				else if(Si[1]=='B' && Si[2]=='B' && Si[0]=='B'){
					System.out.println("No");
				}
				else{
					System.out.println("Yes");
				}
		}
	}
} Main public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		
		String S = scan.next();
		
		if(S.length()==3){
			char[] Si = new char[S.length()];

    		for(int i = 0; i < S.length(); i++){
            	 Si[i] = S.charAt(i);
            }

				if(Si[1]=='A' && Si[2]=='A' && Si[0]=='A'){
					System.out.println("No");
				}
				else if(Si[1]=='B' && Si[2]=='B' && Si[0]=='B'){
					System.out.println("No");
				}
				else{
					System.out.println("Yes");
				}
		}
	} main {
		Scanner scan = new Scanner(System.in);
		
		String S = scan.next();
		
		if(S.length()==3){
			char[] Si = new char[S.length()];

    		for(int i = 0; i < S.length(); i++){
            	 Si[i] = S.charAt(i);
            }

				if(Si[1]=='A' && Si[2]=='A' && Si[0]=='A'){
					System.out.println("No");
				}
				else if(Si[1]=='B' && Si[2]=='B' && Si[0]=='B'){
					System.out.println("No");
				}
				else{
					System.out.println("Yes");
				}
		}
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) String S = scan.next(); S scan.next() scan.next scan if(S.length()==3){
			char[] Si = new char[S.length()];

    		for(int i = 0; i < S.length(); i++){
            	 Si[i] = S.charAt(i);
            }

				if(Si[1]=='A' && Si[2]=='A' && Si[0]=='A'){
					System.out.println("No");
				}
				else if(Si[1]=='B' && Si[2]=='B' && Si[0]=='B'){
					System.out.println("No");
				}
				else{
					System.out.println("Yes");
				}
		} S.length()==3 S.length() S.length S 3 {
			char[] Si = new char[S.length()];

    		for(int i = 0; i < S.length(); i++){
            	 Si[i] = S.charAt(i);
            }

				if(Si[1]=='A' && Si[2]=='A' && Si[0]=='A'){
					System.out.println("No");
				}
				else if(Si[1]=='B' && Si[2]=='B' && Si[0]=='B'){
					System.out.println("No");
				}
				else{
					System.out.println("Yes");
				}
		} char[] Si = new char[S.length()]; Si new char[S.length()] S.length() S.length S for(int i = 0; i < S.length(); i++){
            	 Si[i] = S.charAt(i);
            } int i = 0; int i = 0; i 0 i < S.length() i S.length() S.length S i++ i++ i {
            	 Si[i] = S.charAt(i);
            } {
            	 Si[i] = S.charAt(i);
            } Si[i] = S.charAt(i) Si[i] Si i S.charAt(i) S.charAt S i if(Si[1]=='A' && Si[2]=='A' && Si[0]=='A'){
					System.out.println("No");
				}
				else if(Si[1]=='B' && Si[2]=='B' && Si[0]=='B'){
					System.out.println("No");
				}
				else{
					System.out.println("Yes");
				} Si[1]=='A' && Si[2]=='A' && Si[0]=='A' Si[1]=='A' && Si[2]=='A' && Si[0]=='A' Si[1]=='A' Si[1] Si 1 'A' Si[2]=='A' Si[2] Si 2 'A' Si[0]=='A' Si[0] Si 0 'A' {
					System.out.println("No");
				} System.out.println("No") System.out.println System.out System System.out "No" if(Si[1]=='B' && Si[2]=='B' && Si[0]=='B'){
					System.out.println("No");
				}
				else{
					System.out.println("Yes");
				} Si[1]=='B' && Si[2]=='B' && Si[0]=='B' Si[1]=='B' && Si[2]=='B' && Si[0]=='B' Si[1]=='B' Si[1] Si 1 'B' Si[2]=='B' Si[2] Si 2 'B' Si[0]=='B' Si[0] Si 0 'B' {
					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" String[] args args public class Main{
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		
		String S = scan.next();
		
		if(S.length()==3){
			char[] Si = new char[S.length()];

    		for(int i = 0; i < S.length(); i++){
            	 Si[i] = S.charAt(i);
            }

				if(Si[1]=='A' && Si[2]=='A' && Si[0]=='A'){
					System.out.println("No");
				}
				else if(Si[1]=='B' && Si[2]=='B' && Si[0]=='B'){
					System.out.println("No");
				}
				else{
					System.out.println("Yes");
				}
		}
	}
} public class Main{
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		
		String S = scan.next();
		
		if(S.length()==3){
			char[] Si = new char[S.length()];

    		for(int i = 0; i < S.length(); i++){
            	 Si[i] = S.charAt(i);
            }

				if(Si[1]=='A' && Si[2]=='A' && Si[0]=='A'){
					System.out.println("No");
				}
				else if(Si[1]=='B' && Si[2]=='B' && Si[0]=='B'){
					System.out.println("No");
				}
				else{
					System.out.println("Yes");
				}
		}
	}
} Main
import java.util.*;

public class Main{
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		
		String S = scan.next();
		
		if(S.length()==3){
			char[] Si = new char[S.length()];

    		for(int i = 0; i < S.length(); i++){
            	 Si[i] = S.charAt(i);
            }

				if(Si[1]=='A' && Si[2]=='A' && Si[0]=='A'){
					System.out.println("No");
				}
				else if(Si[1]=='B' && Si[2]=='B' && Si[0]=='B'){
					System.out.println("No");
				}
				else{
					System.out.println("Yes");
				}
		}
	}
}
