import java.util.*;

// "static void main" must be defined in a public class.
public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        String input = sc.nextLine();
        boolean a = false;
        boolean b = false;
        for (char c : input.toCharArray()) {
            if (c == 'A') a = true;
            if (c == 'B') b = true;
        }

        if(a && b) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    }
} import java.util.*; util.* java public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        String input = sc.nextLine();
        boolean a = false;
        boolean b = false;
        for (char c : input.toCharArray()) {
            if (c == 'A') a = true;
            if (c == 'B') b = true;
        }

        if(a && b) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        String input = sc.nextLine();
        boolean a = false;
        boolean b = false;
        for (char c : input.toCharArray()) {
            if (c == 'A') a = true;
            if (c == 'B') b = true;
        }

        if(a && b) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    } main {
        Scanner sc = new Scanner(System.in);

        String input = sc.nextLine();
        boolean a = false;
        boolean b = false;
        for (char c : input.toCharArray()) {
            if (c == 'A') a = true;
            if (c == 'B') b = true;
        }

        if(a && b) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String input = sc.nextLine(); input sc.nextLine() sc.nextLine sc boolean a = false; a false boolean b = false; b false for (char c : input.toCharArray()) {
            if (c == 'A') a = true;
            if (c == 'B') b = true;
        } char c input.toCharArray() input.toCharArray input {
            if (c == 'A') a = true;
            if (c == 'B') b = true;
        } {
            if (c == 'A') a = true;
            if (c == 'B') b = true;
        } if (c == 'A') a = true; c == 'A' c 'A' a = true a true if (c == 'B') b = true; c == 'B' c 'B' b = true b true if(a && b) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        } a && b a b {
            System.out.println("Yes");
        } System.out.println("Yes") System.out.println System.out System System.out "Yes" {
            System.out.println("No");
        } System.out.println("No") System.out.println System.out System System.out "No" String[] args args public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        String input = sc.nextLine();
        boolean a = false;
        boolean b = false;
        for (char c : input.toCharArray()) {
            if (c == 'A') a = true;
            if (c == 'B') b = true;
        }

        if(a && b) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    }
} public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        String input = sc.nextLine();
        boolean a = false;
        boolean b = false;
        for (char c : input.toCharArray()) {
            if (c == 'A') a = true;
            if (c == 'B') b = true;
        }

        if(a && b) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    }
} Main
import java.util.*;

// "static void main" must be defined in a public class.
public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        String input = sc.nextLine();
        boolean a = false;
        boolean b = false;
        for (char c : input.toCharArray()) {
            if (c == 'A') a = true;
            if (c == 'B') b = true;
        }

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