import java.util.*;

public class Main{
	public static void main(String[] args) {
    	Scanner itr = new Scanner(System.in);
      	String s = itr.next();
      	
      	int a = 0;
      	int b = 0;
      	for (char i : s.toCharArray()) {
        	if (i == 'A') a++;
          	else b++;
        }
      
      	if (a == 0 || b == 0)
          System.out.println("No");
      	else
          System.out.println("Yes");
    }
} import java.util.*; util.* java public class Main{
	public static void main(String[] args) {
    	Scanner itr = new Scanner(System.in);
      	String s = itr.next();
      	
      	int a = 0;
      	int b = 0;
      	for (char i : s.toCharArray()) {
        	if (i == 'A') a++;
          	else b++;
        }
      
      	if (a == 0 || b == 0)
          System.out.println("No");
      	else
          System.out.println("Yes");
    }
} Main public static void main(String[] args) {
    	Scanner itr = new Scanner(System.in);
      	String s = itr.next();
      	
      	int a = 0;
      	int b = 0;
      	for (char i : s.toCharArray()) {
        	if (i == 'A') a++;
          	else b++;
        }
      
      	if (a == 0 || b == 0)
          System.out.println("No");
      	else
          System.out.println("Yes");
    } main {
    	Scanner itr = new Scanner(System.in);
      	String s = itr.next();
      	
      	int a = 0;
      	int b = 0;
      	for (char i : s.toCharArray()) {
        	if (i == 'A') a++;
          	else b++;
        }
      
      	if (a == 0 || b == 0)
          System.out.println("No");
      	else
          System.out.println("Yes");
    } Scanner itr = new Scanner(System.in); itr new Scanner(System.in) String s = itr.next(); s itr.next() itr.next itr int a = 0; a 0 int b = 0; b 0 for (char i : s.toCharArray()) {
        	if (i == 'A') a++;
          	else b++;
        } char i s.toCharArray() s.toCharArray s {
        	if (i == 'A') a++;
          	else b++;
        } {
        	if (i == 'A') a++;
          	else b++;
        } if (i == 'A') a++;
          	else b++; i == 'A' i 'A' a++ a b++ b if (a == 0 || b == 0)
          System.out.println("No");
      	else
          System.out.println("Yes"); a == 0 || b == 0 a == 0 a 0 b == 0 b 0 System.out.println("No") System.out.println System.out System System.out "No" 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 itr = new Scanner(System.in);
      	String s = itr.next();
      	
      	int a = 0;
      	int b = 0;
      	for (char i : s.toCharArray()) {
        	if (i == 'A') a++;
          	else b++;
        }
      
      	if (a == 0 || b == 0)
          System.out.println("No");
      	else
          System.out.println("Yes");
    }
} public class Main{
	public static void main(String[] args) {
    	Scanner itr = new Scanner(System.in);
      	String s = itr.next();
      	
      	int a = 0;
      	int b = 0;
      	for (char i : s.toCharArray()) {
        	if (i == 'A') a++;
          	else b++;
        }
      
      	if (a == 0 || b == 0)
          System.out.println("No");
      	else
          System.out.println("Yes");
    }
} Main
import java.util.*;

public class Main{
	public static void main(String[] args) {
    	Scanner itr = new Scanner(System.in);
      	String s = itr.next();
      	
      	int a = 0;
      	int b = 0;
      	for (char i : s.toCharArray()) {
        	if (i == 'A') a++;
          	else b++;
        }
      
      	if (a == 0 || b == 0)
          System.out.println("No");
      	else
          System.out.println("Yes");
    }
}
