import java.util.*;
public class Main {

		static void solve() {
			Scanner sc = new Scanner(System.in);
			String s = sc.next();
			String res = "Yes";
			if(s.equals("BBB")||s.equals("AAA")) {
				res = "No";
			}
			System.out.println(res);
			sc.close();
		}
	public static void main(String[] args) {
		solve();

	}

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

		static void solve() {
			Scanner sc = new Scanner(System.in);
			String s = sc.next();
			String res = "Yes";
			if(s.equals("BBB")||s.equals("AAA")) {
				res = "No";
			}
			System.out.println(res);
			sc.close();
		}
	public static void main(String[] args) {
		solve();

	}

} Main static void solve() {
			Scanner sc = new Scanner(System.in);
			String s = sc.next();
			String res = "Yes";
			if(s.equals("BBB")||s.equals("AAA")) {
				res = "No";
			}
			System.out.println(res);
			sc.close();
		} solve {
			Scanner sc = new Scanner(System.in);
			String s = sc.next();
			String res = "Yes";
			if(s.equals("BBB")||s.equals("AAA")) {
				res = "No";
			}
			System.out.println(res);
			sc.close();
		} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc String res = "Yes"; res "Yes" if(s.equals("BBB")||s.equals("AAA")) {
				res = "No";
			} s.equals("BBB")||s.equals("AAA") s.equals("BBB") s.equals s "BBB" s.equals("AAA") s.equals s "AAA" {
				res = "No";
			} res = "No" res "No" System.out.println(res) System.out.println System.out System System.out res sc.close() sc.close sc public static void main(String[] args) {
		solve();

	} main {
		solve();

	} solve() solve String[] args args public class Main {

		static void solve() {
			Scanner sc = new Scanner(System.in);
			String s = sc.next();
			String res = "Yes";
			if(s.equals("BBB")||s.equals("AAA")) {
				res = "No";
			}
			System.out.println(res);
			sc.close();
		}
	public static void main(String[] args) {
		solve();

	}

} public class Main {

		static void solve() {
			Scanner sc = new Scanner(System.in);
			String s = sc.next();
			String res = "Yes";
			if(s.equals("BBB")||s.equals("AAA")) {
				res = "No";
			}
			System.out.println(res);
			sc.close();
		}
	public static void main(String[] args) {
		solve();

	}

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

		static void solve() {
			Scanner sc = new Scanner(System.in);
			String s = sc.next();
			String res = "Yes";
			if(s.equals("BBB")||s.equals("AAA")) {
				res = "No";
			}
			System.out.println(res);
			sc.close();
		}
	public static void main(String[] args) {
		solve();

	}

}
