import java.io.*;
import java.util.*;
import java.math.*;
public class Main
{
     public static void main(String[]args)throws IOException
     {
           BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
           String s = br.readLine();
           Map<Character,Integer> map = new HashMap<Character,Integer>();
            map.put('A',0);
            map.put('B',0);
           for(int i=0;i<3;i++)
           {
                char ch = s.charAt(i);
                if(ch=='A')
                {
                      int value=map.get('A');
                      value++;
                      map.put('A',value);
                }
                else
                {
                      int value=map.get('B');
                       value++;
                      map.put('B',value);
                }
           }
           if(map.get('A')==3 || map.get('B')==3)
           {
                System.out.println("No");
           }
           else
           {
                System.out.println("Yes");
           }
     }
}
              import java.io.*; io.* java import java.util.*; util.* java import java.math.*; math.* java public class Main
{
     public static void main(String[]args)throws IOException
     {
           BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
           String s = br.readLine();
           Map<Character,Integer> map = new HashMap<Character,Integer>();
            map.put('A',0);
            map.put('B',0);
           for(int i=0;i<3;i++)
           {
                char ch = s.charAt(i);
                if(ch=='A')
                {
                      int value=map.get('A');
                      value++;
                      map.put('A',value);
                }
                else
                {
                      int value=map.get('B');
                       value++;
                      map.put('B',value);
                }
           }
           if(map.get('A')==3 || map.get('B')==3)
           {
                System.out.println("No");
           }
           else
           {
                System.out.println("Yes");
           }
     }
} Main public static void main(String[]args)throws IOException
     {
           BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
           String s = br.readLine();
           Map<Character,Integer> map = new HashMap<Character,Integer>();
            map.put('A',0);
            map.put('B',0);
           for(int i=0;i<3;i++)
           {
                char ch = s.charAt(i);
                if(ch=='A')
                {
                      int value=map.get('A');
                      value++;
                      map.put('A',value);
                }
                else
                {
                      int value=map.get('B');
                       value++;
                      map.put('B',value);
                }
           }
           if(map.get('A')==3 || map.get('B')==3)
           {
                System.out.println("No");
           }
           else
           {
                System.out.println("Yes");
           }
     } main {
           BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
           String s = br.readLine();
           Map<Character,Integer> map = new HashMap<Character,Integer>();
            map.put('A',0);
            map.put('B',0);
           for(int i=0;i<3;i++)
           {
                char ch = s.charAt(i);
                if(ch=='A')
                {
                      int value=map.get('A');
                      value++;
                      map.put('A',value);
                }
                else
                {
                      int value=map.get('B');
                       value++;
                      map.put('B',value);
                }
           }
           if(map.get('A')==3 || map.get('B')==3)
           {
                System.out.println("No");
           }
           else
           {
                System.out.println("Yes");
           }
     } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String s = br.readLine(); s br.readLine() br.readLine br Map<Character,Integer> map = new HashMap<Character,Integer>(); map new HashMap<Character,Integer>() map.put('A',0) map.put map 'A' 0 map.put('B',0) map.put map 'B' 0 for(int i=0;i<3;i++)
           {
                char ch = s.charAt(i);
                if(ch=='A')
                {
                      int value=map.get('A');
                      value++;
                      map.put('A',value);
                }
                else
                {
                      int value=map.get('B');
                       value++;
                      map.put('B',value);
                }
           } int i=0; int i=0; i 0 i<3 i 3 i++ i++ i {
                char ch = s.charAt(i);
                if(ch=='A')
                {
                      int value=map.get('A');
                      value++;
                      map.put('A',value);
                }
                else
                {
                      int value=map.get('B');
                       value++;
                      map.put('B',value);
                }
           } {
                char ch = s.charAt(i);
                if(ch=='A')
                {
                      int value=map.get('A');
                      value++;
                      map.put('A',value);
                }
                else
                {
                      int value=map.get('B');
                       value++;
                      map.put('B',value);
                }
           } char ch = s.charAt(i); ch s.charAt(i) s.charAt s i if(ch=='A')
                {
                      int value=map.get('A');
                      value++;
                      map.put('A',value);
                }
                else
                {
                      int value=map.get('B');
                       value++;
                      map.put('B',value);
                } ch=='A' ch 'A' {
                      int value=map.get('A');
                      value++;
                      map.put('A',value);
                } int value=map.get('A'); value map.get('A') map.get map 'A' value++ value map.put('A',value) map.put map 'A' value {
                      int value=map.get('B');
                       value++;
                      map.put('B',value);
                } int value=map.get('B'); value map.get('B') map.get map 'B' value++ value map.put('B',value) map.put map 'B' value if(map.get('A')==3 || map.get('B')==3)
           {
                System.out.println("No");
           }
           else
           {
                System.out.println("Yes");
           } map.get('A')==3 || map.get('B')==3 map.get('A')==3 map.get('A') map.get map 'A' 3 map.get('B')==3 map.get('B') map.get map 'B' 3 {
                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)throws IOException
     {
           BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
           String s = br.readLine();
           Map<Character,Integer> map = new HashMap<Character,Integer>();
            map.put('A',0);
            map.put('B',0);
           for(int i=0;i<3;i++)
           {
                char ch = s.charAt(i);
                if(ch=='A')
                {
                      int value=map.get('A');
                      value++;
                      map.put('A',value);
                }
                else
                {
                      int value=map.get('B');
                       value++;
                      map.put('B',value);
                }
           }
           if(map.get('A')==3 || map.get('B')==3)
           {
                System.out.println("No");
           }
           else
           {
                System.out.println("Yes");
           }
     }
} public class Main
{
     public static void main(String[]args)throws IOException
     {
           BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
           String s = br.readLine();
           Map<Character,Integer> map = new HashMap<Character,Integer>();
            map.put('A',0);
            map.put('B',0);
           for(int i=0;i<3;i++)
           {
                char ch = s.charAt(i);
                if(ch=='A')
                {
                      int value=map.get('A');
                      value++;
                      map.put('A',value);
                }
                else
                {
                      int value=map.get('B');
                       value++;
                      map.put('B',value);
                }
           }
           if(map.get('A')==3 || map.get('B')==3)
           {
                System.out.println("No");
           }
           else
           {
                System.out.println("Yes");
           }
     }
} Main
import java.io.*;
import java.util.*;
import java.math.*;
public class Main
{
     public static void main(String[]args)throws IOException
     {
           BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
           String s = br.readLine();
           Map<Character,Integer> map = new HashMap<Character,Integer>();
            map.put('A',0);
            map.put('B',0);
           for(int i=0;i<3;i++)
           {
                char ch = s.charAt(i);
                if(ch=='A')
                {
                      int value=map.get('A');
                      value++;
                      map.put('A',value);
                }
                else
                {
                      int value=map.get('B');
                       value++;
                      map.put('B',value);
                }
           }
           if(map.get('A')==3 || map.get('B')==3)
           {
                System.out.println("No");
           }
           else
           {
                System.out.println("Yes");
           }
     }
}
             