

import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {

		public static void main(String[] args) throws java.lang.Exception {
		      BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		      String s = br.readLine();
		      int a = 0, b = 0;
		      for(char c : s.toCharArray()) {
		    	  if(c == 'A')
		    		  a++;
		    	  if(c == 'B')
		    		  b++;
		      }
		      if(a == 0 || b == 0)
		    	  System.out.println("No");
		      else
		    	  System.out.println("Yes");
		}
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {

		public static void main(String[] args) throws java.lang.Exception {
		      BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		      String s = br.readLine();
		      int a = 0, b = 0;
		      for(char c : s.toCharArray()) {
		    	  if(c == 'A')
		    		  a++;
		    	  if(c == 'B')
		    		  b++;
		      }
		      if(a == 0 || b == 0)
		    	  System.out.println("No");
		      else
		    	  System.out.println("Yes");
		}
} Main public static void main(String[] args) throws java.lang.Exception {
		      BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		      String s = br.readLine();
		      int a = 0, b = 0;
		      for(char c : s.toCharArray()) {
		    	  if(c == 'A')
		    		  a++;
		    	  if(c == 'B')
		    		  b++;
		      }
		      if(a == 0 || b == 0)
		    	  System.out.println("No");
		      else
		    	  System.out.println("Yes");
		} main {
		      BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		      String s = br.readLine();
		      int a = 0, b = 0;
		      for(char c : s.toCharArray()) {
		    	  if(c == 'A')
		    		  a++;
		    	  if(c == 'B')
		    		  b++;
		      }
		      if(a == 0 || b == 0)
		    	  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 int a = 0 a 0 b = 0; b 0 for(char c : s.toCharArray()) {
		    	  if(c == 'A')
		    		  a++;
		    	  if(c == 'B')
		    		  b++;
		      } char c s.toCharArray() s.toCharArray s {
		    	  if(c == 'A')
		    		  a++;
		    	  if(c == 'B')
		    		  b++;
		      } {
		    	  if(c == 'A')
		    		  a++;
		    	  if(c == 'B')
		    		  b++;
		      } if(c == 'A')
		    		  a++; c == 'A' c 'A' a++ a if(c == 'B')
		    		  b++; c == 'B' c 'B' 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) throws java.lang.Exception {
		      BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		      String s = br.readLine();
		      int a = 0, b = 0;
		      for(char c : s.toCharArray()) {
		    	  if(c == 'A')
		    		  a++;
		    	  if(c == 'B')
		    		  b++;
		      }
		      if(a == 0 || b == 0)
		    	  System.out.println("No");
		      else
		    	  System.out.println("Yes");
		}
} public class Main {

		public static void main(String[] args) throws java.lang.Exception {
		      BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		      String s = br.readLine();
		      int a = 0, b = 0;
		      for(char c : s.toCharArray()) {
		    	  if(c == 'A')
		    		  a++;
		    	  if(c == 'B')
		    		  b++;
		      }
		      if(a == 0 || b == 0)
		    	  System.out.println("No");
		      else
		    	  System.out.println("Yes");
		}
} Main


import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {

		public static void main(String[] args) throws java.lang.Exception {
		      BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		      String s = br.readLine();
		      int a = 0, b = 0;
		      for(char c : s.toCharArray()) {
		    	  if(c == 'A')
		    		  a++;
		    	  if(c == 'B')
		    		  b++;
		      }
		      if(a == 0 || b == 0)
		    	  System.out.println("No");
		      else
		    	  System.out.println("Yes");
		}
}
