import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        // 文字の入力
        String s = sc.next();
        // 出力用
        String answer = "No";
        if (s.contains("A")) {
            if (s.contains("B")) {
                answer = "Yes";
            }
        }
        // 出力
        System.out.println(answer);
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        // 文字の入力
        String s = sc.next();
        // 出力用
        String answer = "No";
        if (s.contains("A")) {
            if (s.contains("B")) {
                answer = "Yes";
            }
        }
        // 出力
        System.out.println(answer);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        // 文字の入力
        String s = sc.next();
        // 出力用
        String answer = "No";
        if (s.contains("A")) {
            if (s.contains("B")) {
                answer = "Yes";
            }
        }
        // 出力
        System.out.println(answer);
    } main {
        Scanner sc = new Scanner(System.in);
        // 文字の入力
        String s = sc.next();
        // 出力用
        String answer = "No";
        if (s.contains("A")) {
            if (s.contains("B")) {
                answer = "Yes";
            }
        }
        // 出力
        System.out.println(answer);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc String answer = "No"; answer "No" if (s.contains("A")) {
            if (s.contains("B")) {
                answer = "Yes";
            }
        } s.contains("A") s.contains s "A" {
            if (s.contains("B")) {
                answer = "Yes";
            }
        } if (s.contains("B")) {
                answer = "Yes";
            } s.contains("B") s.contains s "B" {
                answer = "Yes";
            } answer = "Yes" answer "Yes" System.out.println(answer) System.out.println System.out System System.out answer String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        // 文字の入力
        String s = sc.next();
        // 出力用
        String answer = "No";
        if (s.contains("A")) {
            if (s.contains("B")) {
                answer = "Yes";
            }
        }
        // 出力
        System.out.println(answer);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        // 文字の入力
        String s = sc.next();
        // 出力用
        String answer = "No";
        if (s.contains("A")) {
            if (s.contains("B")) {
                answer = "Yes";
            }
        }
        // 出力
        System.out.println(answer);
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        // 文字の入力
        String s = sc.next();
        // 出力用
        String answer = "No";
        if (s.contains("A")) {
            if (s.contains("B")) {
                answer = "Yes";
            }
        }
        // 出力
        System.out.println(answer);
    }
}