import java.util.Scanner;

public class Main {

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

}
