import java.util.*;
import java.io.*;
public class Main{
  public static void main(String[] args) {
    Scanner sc=new Scanner(System.in);
    String str1 = sc.nextLine();
    int len = str1.length();
    int counta = 0;
    int countb = 0;
    for(int i= 0; i < len; i++) {
      if(counta > 0 && countb > 0) 
            break;
      if(str1.charAt(i) == 'A') {
        counta += 1;
      }
      else {
        countb += 1;
      }
    }
    System.out.println((counta > 0 && countb > 0) ? "Yes" : "No");
  }
} import java.util.*; util.* java import java.io.*; io.* java public class Main{
  public static void main(String[] args) {
    Scanner sc=new Scanner(System.in);
    String str1 = sc.nextLine();
    int len = str1.length();
    int counta = 0;
    int countb = 0;
    for(int i= 0; i < len; i++) {
      if(counta > 0 && countb > 0) 
            break;
      if(str1.charAt(i) == 'A') {
        counta += 1;
      }
      else {
        countb += 1;
      }
    }
    System.out.println((counta > 0 && countb > 0) ? "Yes" : "No");
  }
} Main public static void main(String[] args) {
    Scanner sc=new Scanner(System.in);
    String str1 = sc.nextLine();
    int len = str1.length();
    int counta = 0;
    int countb = 0;
    for(int i= 0; i < len; i++) {
      if(counta > 0 && countb > 0) 
            break;
      if(str1.charAt(i) == 'A') {
        counta += 1;
      }
      else {
        countb += 1;
      }
    }
    System.out.println((counta > 0 && countb > 0) ? "Yes" : "No");
  } main {
    Scanner sc=new Scanner(System.in);
    String str1 = sc.nextLine();
    int len = str1.length();
    int counta = 0;
    int countb = 0;
    for(int i= 0; i < len; i++) {
      if(counta > 0 && countb > 0) 
            break;
      if(str1.charAt(i) == 'A') {
        counta += 1;
      }
      else {
        countb += 1;
      }
    }
    System.out.println((counta > 0 && countb > 0) ? "Yes" : "No");
  } Scanner sc=new Scanner(System.in); sc new Scanner(System.in) String str1 = sc.nextLine(); str1 sc.nextLine() sc.nextLine sc int len = str1.length(); len str1.length() str1.length str1 int counta = 0; counta 0 int countb = 0; countb 0 for(int i= 0; i < len; i++) {
      if(counta > 0 && countb > 0) 
            break;
      if(str1.charAt(i) == 'A') {
        counta += 1;
      }
      else {
        countb += 1;
      }
    } int i= 0; int i= 0; i 0 i < len i len i++ i++ i {
      if(counta > 0 && countb > 0) 
            break;
      if(str1.charAt(i) == 'A') {
        counta += 1;
      }
      else {
        countb += 1;
      }
    } {
      if(counta > 0 && countb > 0) 
            break;
      if(str1.charAt(i) == 'A') {
        counta += 1;
      }
      else {
        countb += 1;
      }
    } if(counta > 0 && countb > 0) 
            break; counta > 0 && countb > 0 counta > 0 counta 0 countb > 0 countb 0 break; if(str1.charAt(i) == 'A') {
        counta += 1;
      }
      else {
        countb += 1;
      } str1.charAt(i) == 'A' str1.charAt(i) str1.charAt str1 i 'A' {
        counta += 1;
      } counta += 1 counta 1 {
        countb += 1;
      } countb += 1 countb 1 System.out.println((counta > 0 && countb > 0) ? "Yes" : "No") System.out.println System.out System System.out (counta > 0 && countb > 0) ? "Yes" : "No" (counta > 0 && countb > 0) counta > 0 counta 0 countb > 0 countb 0 "Yes" "No" String[] args args public class Main{
  public static void main(String[] args) {
    Scanner sc=new Scanner(System.in);
    String str1 = sc.nextLine();
    int len = str1.length();
    int counta = 0;
    int countb = 0;
    for(int i= 0; i < len; i++) {
      if(counta > 0 && countb > 0) 
            break;
      if(str1.charAt(i) == 'A') {
        counta += 1;
      }
      else {
        countb += 1;
      }
    }
    System.out.println((counta > 0 && countb > 0) ? "Yes" : "No");
  }
} public class Main{
  public static void main(String[] args) {
    Scanner sc=new Scanner(System.in);
    String str1 = sc.nextLine();
    int len = str1.length();
    int counta = 0;
    int countb = 0;
    for(int i= 0; i < len; i++) {
      if(counta > 0 && countb > 0) 
            break;
      if(str1.charAt(i) == 'A') {
        counta += 1;
      }
      else {
        countb += 1;
      }
    }
    System.out.println((counta > 0 && countb > 0) ? "Yes" : "No");
  }
} Main
import java.util.*;
import java.io.*;
public class Main{
  public static void main(String[] args) {
    Scanner sc=new Scanner(System.in);
    String str1 = sc.nextLine();
    int len = str1.length();
    int counta = 0;
    int countb = 0;
    for(int i= 0; i < len; i++) {
      if(counta > 0 && countb > 0) 
            break;
      if(str1.charAt(i) == 'A') {
        counta += 1;
      }
      else {
        countb += 1;
      }
    }
    System.out.println((counta > 0 && countb > 0) ? "Yes" : "No");
  }
}
