import java.util.*;
class Main
{
  public static void main(String[] args)
  {
    Scanner sc=new Scanner(System.in);
    String str=sc.next();
    int l=str.length();
    String result="";
    for(int i=0;i<l;i++)
    {
      char ch=str.charAt(i);
      result=result+ch;
    }
    if(result.equals("AAA")||result.equals("BBB"))
    {
      System.out.println("No");
    }
    else
    {
      System.out.println("Yes");
    }
  }
} import java.util.*; util.* java class Main
{
  public static void main(String[] args)
  {
    Scanner sc=new Scanner(System.in);
    String str=sc.next();
    int l=str.length();
    String result="";
    for(int i=0;i<l;i++)
    {
      char ch=str.charAt(i);
      result=result+ch;
    }
    if(result.equals("AAA")||result.equals("BBB"))
    {
      System.out.println("No");
    }
    else
    {
      System.out.println("Yes");
    }
  }
} Main public static void main(String[] args)
  {
    Scanner sc=new Scanner(System.in);
    String str=sc.next();
    int l=str.length();
    String result="";
    for(int i=0;i<l;i++)
    {
      char ch=str.charAt(i);
      result=result+ch;
    }
    if(result.equals("AAA")||result.equals("BBB"))
    {
      System.out.println("No");
    }
    else
    {
      System.out.println("Yes");
    }
  } main {
    Scanner sc=new Scanner(System.in);
    String str=sc.next();
    int l=str.length();
    String result="";
    for(int i=0;i<l;i++)
    {
      char ch=str.charAt(i);
      result=result+ch;
    }
    if(result.equals("AAA")||result.equals("BBB"))
    {
      System.out.println("No");
    }
    else
    {
      System.out.println("Yes");
    }
  } Scanner sc=new Scanner(System.in); sc new Scanner(System.in) String str=sc.next(); str sc.next() sc.next sc int l=str.length(); l str.length() str.length str String result=""; result "" for(int i=0;i<l;i++)
    {
      char ch=str.charAt(i);
      result=result+ch;
    } int i=0; int i=0; i 0 i<l i l i++ i++ i {
      char ch=str.charAt(i);
      result=result+ch;
    } {
      char ch=str.charAt(i);
      result=result+ch;
    } char ch=str.charAt(i); ch str.charAt(i) str.charAt str i result=result+ch result result+ch result ch if(result.equals("AAA")||result.equals("BBB"))
    {
      System.out.println("No");
    }
    else
    {
      System.out.println("Yes");
    } result.equals("AAA")||result.equals("BBB") result.equals("AAA") result.equals result "AAA" result.equals("BBB") result.equals result "BBB" {
      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
import java.util.*;
class Main
{
  public static void main(String[] args)
  {
    Scanner sc=new Scanner(System.in);
    String str=sc.next();
    int l=str.length();
    String result="";
    for(int i=0;i<l;i++)
    {
      char ch=str.charAt(i);
      result=result+ch;
    }
    if(result.equals("AAA")||result.equals("BBB"))
    {
      System.out.println("No");
    }
    else
    {
      System.out.println("Yes");
    }
  }
}