import java.util.Scanner;

public class Main {
	
	public static void main(String[] args)
	{
		Scanner s=new Scanner(System.in);
		
		String str=s.next();
		
		int a=0;
		int b=0;
		
		for(int i=0;i<str.length();i++)
		{
			if(str.charAt(i)=='A')
			{
				a++;
			}
			else
			{
				b++;
			}
		}
		
		if(a==3||b==3)
		{
			System.out.println("No");
		}
		else
		{
			System.out.println("Yes");
		}
		
	}
	
} import java.util.Scanner; Scanner java.util public class Main {
	
	public static void main(String[] args)
	{
		Scanner s=new Scanner(System.in);
		
		String str=s.next();
		
		int a=0;
		int b=0;
		
		for(int i=0;i<str.length();i++)
		{
			if(str.charAt(i)=='A')
			{
				a++;
			}
			else
			{
				b++;
			}
		}
		
		if(a==3||b==3)
		{
			System.out.println("No");
		}
		else
		{
			System.out.println("Yes");
		}
		
	}
	
} Main public static void main(String[] args)
	{
		Scanner s=new Scanner(System.in);
		
		String str=s.next();
		
		int a=0;
		int b=0;
		
		for(int i=0;i<str.length();i++)
		{
			if(str.charAt(i)=='A')
			{
				a++;
			}
			else
			{
				b++;
			}
		}
		
		if(a==3||b==3)
		{
			System.out.println("No");
		}
		else
		{
			System.out.println("Yes");
		}
		
	} main {
		Scanner s=new Scanner(System.in);
		
		String str=s.next();
		
		int a=0;
		int b=0;
		
		for(int i=0;i<str.length();i++)
		{
			if(str.charAt(i)=='A')
			{
				a++;
			}
			else
			{
				b++;
			}
		}
		
		if(a==3||b==3)
		{
			System.out.println("No");
		}
		else
		{
			System.out.println("Yes");
		}
		
	} Scanner s=new Scanner(System.in); s new Scanner(System.in) String str=s.next(); str s.next() s.next s int a=0; a 0 int b=0; b 0 for(int i=0;i<str.length();i++)
		{
			if(str.charAt(i)=='A')
			{
				a++;
			}
			else
			{
				b++;
			}
		} int i=0; int i=0; i 0 i<str.length() i str.length() str.length str i++ i++ i {
			if(str.charAt(i)=='A')
			{
				a++;
			}
			else
			{
				b++;
			}
		} {
			if(str.charAt(i)=='A')
			{
				a++;
			}
			else
			{
				b++;
			}
		} if(str.charAt(i)=='A')
			{
				a++;
			}
			else
			{
				b++;
			} str.charAt(i)=='A' str.charAt(i) str.charAt str i 'A' {
				a++;
			} a++ a {
				b++;
			} b++ b if(a==3||b==3)
		{
			System.out.println("No");
		}
		else
		{
			System.out.println("Yes");
		} a==3||b==3 a==3 a 3 b==3 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)
	{
		Scanner s=new Scanner(System.in);
		
		String str=s.next();
		
		int a=0;
		int b=0;
		
		for(int i=0;i<str.length();i++)
		{
			if(str.charAt(i)=='A')
			{
				a++;
			}
			else
			{
				b++;
			}
		}
		
		if(a==3||b==3)
		{
			System.out.println("No");
		}
		else
		{
			System.out.println("Yes");
		}
		
	}
	
} public class Main {
	
	public static void main(String[] args)
	{
		Scanner s=new Scanner(System.in);
		
		String str=s.next();
		
		int a=0;
		int b=0;
		
		for(int i=0;i<str.length();i++)
		{
			if(str.charAt(i)=='A')
			{
				a++;
			}
			else
			{
				b++;
			}
		}
		
		if(a==3||b==3)
		{
			System.out.println("No");
		}
		else
		{
			System.out.println("Yes");
		}
		
	}
	
} Main
import java.util.Scanner;

public class Main {
	
	public static void main(String[] args)
	{
		Scanner s=new Scanner(System.in);
		
		String str=s.next();
		
		int a=0;
		int b=0;
		
		for(int i=0;i<str.length();i++)
		{
			if(str.charAt(i)=='A')
			{
				a++;
			}
			else
			{
				b++;
			}
		}
		
		if(a==3||b==3)
		{
			System.out.println("No");
		}
		else
		{
			System.out.println("Yes");
		}
		
	}
	
}