import java.util.Scanner;

public class Main
{
    public static void main(String [] args)
    {
        Scanner key = new Scanner(System.in);
        String s = key.nextLine();
        int a = 0;
        int b = 0;

        for(int i = 0; i<s.length(); i++)
        {
            char c = s.charAt(i);
            if(c == 'A')
                a++;
            else
                b++;
        }

        if(a == 0 || b == 0)
        {
            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 key = new Scanner(System.in);
        String s = key.nextLine();
        int a = 0;
        int b = 0;

        for(int i = 0; i<s.length(); i++)
        {
            char c = s.charAt(i);
            if(c == 'A')
                a++;
            else
                b++;
        }

        if(a == 0 || b == 0)
        {
            System.out.println("No");
        }
        else
            System.out.println("Yes");
    }
} Main public static void main(String [] args)
    {
        Scanner key = new Scanner(System.in);
        String s = key.nextLine();
        int a = 0;
        int b = 0;

        for(int i = 0; i<s.length(); i++)
        {
            char c = s.charAt(i);
            if(c == 'A')
                a++;
            else
                b++;
        }

        if(a == 0 || b == 0)
        {
            System.out.println("No");
        }
        else
            System.out.println("Yes");
    } main {
        Scanner key = new Scanner(System.in);
        String s = key.nextLine();
        int a = 0;
        int b = 0;

        for(int i = 0; i<s.length(); i++)
        {
            char c = s.charAt(i);
            if(c == 'A')
                a++;
            else
                b++;
        }

        if(a == 0 || b == 0)
        {
            System.out.println("No");
        }
        else
            System.out.println("Yes");
    } Scanner key = new Scanner(System.in); key new Scanner(System.in) String s = key.nextLine(); s key.nextLine() key.nextLine key int a = 0; a 0 int b = 0; b 0 for(int i = 0; i<s.length(); i++)
        {
            char c = s.charAt(i);
            if(c == 'A')
                a++;
            else
                b++;
        } int i = 0; int i = 0; i 0 i<s.length() i s.length() s.length s i++ i++ i {
            char c = s.charAt(i);
            if(c == 'A')
                a++;
            else
                b++;
        } {
            char c = s.charAt(i);
            if(c == 'A')
                a++;
            else
                b++;
        } char c = s.charAt(i); c s.charAt(i) s.charAt s i if(c == 'A')
                a++;
            else
                b++; c == 'A' c 'A' a++ a 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("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)
    {
        Scanner key = new Scanner(System.in);
        String s = key.nextLine();
        int a = 0;
        int b = 0;

        for(int i = 0; i<s.length(); i++)
        {
            char c = s.charAt(i);
            if(c == 'A')
                a++;
            else
                b++;
        }

        if(a == 0 || b == 0)
        {
            System.out.println("No");
        }
        else
            System.out.println("Yes");
    }
} public class Main
{
    public static void main(String [] args)
    {
        Scanner key = new Scanner(System.in);
        String s = key.nextLine();
        int a = 0;
        int b = 0;

        for(int i = 0; i<s.length(); i++)
        {
            char c = s.charAt(i);
            if(c == 'A')
                a++;
            else
                b++;
        }

        if(a == 0 || b == 0)
        {
            System.out.println("No");
        }
        else
            System.out.println("Yes");
    }
} Main
import java.util.Scanner;

public class Main
{
    public static void main(String [] args)
    {
        Scanner key = new Scanner(System.in);
        String s = key.nextLine();
        int a = 0;
        int b = 0;

        for(int i = 0; i<s.length(); i++)
        {
            char c = s.charAt(i);
            if(c == 'A')
                a++;
            else
                b++;
        }

        if(a == 0 || b == 0)
        {
            System.out.println("No");
        }
        else
            System.out.println("Yes");
    }
}