import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String eki = sc.next();
		System.out.print(eki.contains("AAA") || eki.contains("BBB") ? "No" : "Yes");
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String eki = sc.next();
		System.out.print(eki.contains("AAA") || eki.contains("BBB") ? "No" : "Yes");
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String eki = sc.next();
		System.out.print(eki.contains("AAA") || eki.contains("BBB") ? "No" : "Yes");
	} main {
		Scanner sc = new Scanner(System.in);
		String eki = sc.next();
		System.out.print(eki.contains("AAA") || eki.contains("BBB") ? "No" : "Yes");
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String eki = sc.next(); eki sc.next() sc.next sc System.out.print(eki.contains("AAA") || eki.contains("BBB") ? "No" : "Yes") System.out.print System.out System System.out eki.contains("AAA") || eki.contains("BBB") ? "No" : "Yes" eki.contains("AAA") || eki.contains("BBB") eki.contains("AAA") eki.contains eki "AAA" eki.contains("BBB") eki.contains eki "BBB" "No" "Yes" String[] args args public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String eki = sc.next();
		System.out.print(eki.contains("AAA") || eki.contains("BBB") ? "No" : "Yes");
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String eki = sc.next();
		System.out.print(eki.contains("AAA") || eki.contains("BBB") ? "No" : "Yes");
	}
} Main
import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String eki = sc.next();
		System.out.print(eki.contains("AAA") || eki.contains("BBB") ? "No" : "Yes");
	}
}
