
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        char[] s = in.next().toCharArray();
        boolean A = false;
        boolean B = false;
        for(int i = 0; i < s.length; i++) {
            if(s[i] == 'A') A = true;
            if(s[i] == 'B') B = true;
        }
        if(A && B)
            System.out.println("Yes");
        else
            System.out.println("No");
    }

} import java.util.Scanner; Scanner java.util public class Main {

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        char[] s = in.next().toCharArray();
        boolean A = false;
        boolean B = false;
        for(int i = 0; i < s.length; i++) {
            if(s[i] == 'A') A = true;
            if(s[i] == 'B') B = true;
        }
        if(A && B)
            System.out.println("Yes");
        else
            System.out.println("No");
    }

} Main public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        char[] s = in.next().toCharArray();
        boolean A = false;
        boolean B = false;
        for(int i = 0; i < s.length; i++) {
            if(s[i] == 'A') A = true;
            if(s[i] == 'B') B = true;
        }
        if(A && B)
            System.out.println("Yes");
        else
            System.out.println("No");
    } main {
        Scanner in = new Scanner(System.in);
        char[] s = in.next().toCharArray();
        boolean A = false;
        boolean B = false;
        for(int i = 0; i < s.length; i++) {
            if(s[i] == 'A') A = true;
            if(s[i] == 'B') B = true;
        }
        if(A && B)
            System.out.println("Yes");
        else
            System.out.println("No");
    } Scanner in = new Scanner(System.in); in new Scanner(System.in) char[] s = in.next().toCharArray(); s in.next().toCharArray() in.next().toCharArray in.next() in.next in boolean A = false; A false boolean B = false; B false for(int i = 0; i < s.length; i++) {
            if(s[i] == 'A') A = true;
            if(s[i] == 'B') B = true;
        } int i = 0; int i = 0; i 0 i < s.length i s.length s s.length i++ i++ i {
            if(s[i] == 'A') A = true;
            if(s[i] == 'B') B = true;
        } {
            if(s[i] == 'A') A = true;
            if(s[i] == 'B') B = true;
        } if(s[i] == 'A') A = true; s[i] == 'A' s[i] s i 'A' A = true A true if(s[i] == 'B') B = true; s[i] == 'B' s[i] s i '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 System.out System System.out "Yes" 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 in = new Scanner(System.in);
        char[] s = in.next().toCharArray();
        boolean A = false;
        boolean B = false;
        for(int i = 0; i < s.length; i++) {
            if(s[i] == 'A') A = true;
            if(s[i] == '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 in = new Scanner(System.in);
        char[] s = in.next().toCharArray();
        boolean A = false;
        boolean B = false;
        for(int i = 0; i < s.length; i++) {
            if(s[i] == 'A') A = true;
            if(s[i] == 'B') B = true;
        }
        if(A && B)
            System.out.println("Yes");
        else
            System.out.println("No");
    }

} Main

import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        char[] s = in.next().toCharArray();
        boolean A = false;
        boolean B = false;
        for(int i = 0; i < s.length; i++) {
            if(s[i] == 'A') A = true;
            if(s[i] == 'B') B = true;
        }
        if(A && B)
            System.out.println("Yes");
        else
            System.out.println("No");
    }

}
