import java.io.*;
import java.util.*;

class Main{
    public static void main(String[] args)throws IOException{
      try(BufferedReader br = new BufferedReader(new InputStreamReader(System.in))){
        String input = br.readLine();
        int result = 0;

        if(input.contains("A")){
          result++;
        }

        if(input.contains("B")){
          result++;
        }

        if(result == 2){
          System.out.println("Yes");
        }else{
          System.out.println("No");
        }
      }
    }
} import java.io.*; io.* java import java.util.*; util.* java class Main{
    public static void main(String[] args)throws IOException{
      try(BufferedReader br = new BufferedReader(new InputStreamReader(System.in))){
        String input = br.readLine();
        int result = 0;

        if(input.contains("A")){
          result++;
        }

        if(input.contains("B")){
          result++;
        }

        if(result == 2){
          System.out.println("Yes");
        }else{
          System.out.println("No");
        }
      }
    }
} Main public static void main(String[] args)throws IOException{
      try(BufferedReader br = new BufferedReader(new InputStreamReader(System.in))){
        String input = br.readLine();
        int result = 0;

        if(input.contains("A")){
          result++;
        }

        if(input.contains("B")){
          result++;
        }

        if(result == 2){
          System.out.println("Yes");
        }else{
          System.out.println("No");
        }
      }
    } main {
      try(BufferedReader br = new BufferedReader(new InputStreamReader(System.in))){
        String input = br.readLine();
        int result = 0;

        if(input.contains("A")){
          result++;
        }

        if(input.contains("B")){
          result++;
        }

        if(result == 2){
          System.out.println("Yes");
        }else{
          System.out.println("No");
        }
      }
    } try(BufferedReader br = new BufferedReader(new InputStreamReader(System.in))){
        String input = br.readLine();
        int result = 0;

        if(input.contains("A")){
          result++;
        }

        if(input.contains("B")){
          result++;
        }

        if(result == 2){
          System.out.println("Yes");
        }else{
          System.out.println("No");
        }
      } {
        String input = br.readLine();
        int result = 0;

        if(input.contains("A")){
          result++;
        }

        if(input.contains("B")){
          result++;
        }

        if(result == 2){
          System.out.println("Yes");
        }else{
          System.out.println("No");
        }
      } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)) BufferedReader br = new BufferedReader(new InputStreamReader(System.in)) new BufferedReader(new InputStreamReader(System.in)) String input = br.readLine(); input br.readLine() br.readLine br int result = 0; result 0 if(input.contains("A")){
          result++;
        } input.contains("A") input.contains input "A" {
          result++;
        } result++ result if(input.contains("B")){
          result++;
        } input.contains("B") input.contains input "B" {
          result++;
        } result++ result if(result == 2){
          System.out.println("Yes");
        }else{
          System.out.println("No");
        } result == 2 result 2 {
          System.out.println("Yes");
        } System.out.println("Yes") System.out.println System.out System System.out "Yes" {
          System.out.println("No");
        } System.out.println("No") System.out.println System.out System System.out "No" String[] args args
import java.io.*;
import java.util.*;

class Main{
    public static void main(String[] args)throws IOException{
      try(BufferedReader br = new BufferedReader(new InputStreamReader(System.in))){
        String input = br.readLine();
        int result = 0;

        if(input.contains("A")){
          result++;
        }

        if(input.contains("B")){
          result++;
        }

        if(result == 2){
          System.out.println("Yes");
        }else{
          System.out.println("No");
        }
      }
    }
}