import java.util.*;
public class Main {
	public static void main(String[] args) {
		Scanner sc =new Scanner(System.in);
		String s=sc.next();
		boolean a=false,b=false;
		for(int i=0;i<s.length();i++) {
			if(s.charAt(i)=='A') {
				a=true;
			}else if(s.charAt(i)=='B') {
				b=true;
			}
		}
		System.out.println(a&&b? "Yes":"No");
	}
} import java.util.*; util.* java public class Main {
	public static void main(String[] args) {
		Scanner sc =new Scanner(System.in);
		String s=sc.next();
		boolean a=false,b=false;
		for(int i=0;i<s.length();i++) {
			if(s.charAt(i)=='A') {
				a=true;
			}else if(s.charAt(i)=='B') {
				b=true;
			}
		}
		System.out.println(a&&b? "Yes":"No");
	}
} Main public static void main(String[] args) {
		Scanner sc =new Scanner(System.in);
		String s=sc.next();
		boolean a=false,b=false;
		for(int i=0;i<s.length();i++) {
			if(s.charAt(i)=='A') {
				a=true;
			}else if(s.charAt(i)=='B') {
				b=true;
			}
		}
		System.out.println(a&&b? "Yes":"No");
	} main {
		Scanner sc =new Scanner(System.in);
		String s=sc.next();
		boolean a=false,b=false;
		for(int i=0;i<s.length();i++) {
			if(s.charAt(i)=='A') {
				a=true;
			}else if(s.charAt(i)=='B') {
				b=true;
			}
		}
		System.out.println(a&&b? "Yes":"No");
	} Scanner sc =new Scanner(System.in); sc new Scanner(System.in) String s=sc.next(); s sc.next() sc.next sc boolean a=false a false b=false; b false for(int i=0;i<s.length();i++) {
			if(s.charAt(i)=='A') {
				a=true;
			}else if(s.charAt(i)=='B') {
				b=true;
			}
		} int i=0; int i=0; i 0 i<s.length() i s.length() s.length s i++ i++ i {
			if(s.charAt(i)=='A') {
				a=true;
			}else if(s.charAt(i)=='B') {
				b=true;
			}
		} {
			if(s.charAt(i)=='A') {
				a=true;
			}else if(s.charAt(i)=='B') {
				b=true;
			}
		} if(s.charAt(i)=='A') {
				a=true;
			}else if(s.charAt(i)=='B') {
				b=true;
			} s.charAt(i)=='A' s.charAt(i) s.charAt s i 'A' {
				a=true;
			} a=true a true if(s.charAt(i)=='B') {
				b=true;
			} s.charAt(i)=='B' s.charAt(i) s.charAt s i 'B' {
				b=true;
			} b=true b true System.out.println(a&&b? "Yes":"No") System.out.println System.out System System.out a&&b? "Yes":"No" a&&b a b "Yes" "No" String[] args args public class Main {
	public static void main(String[] args) {
		Scanner sc =new Scanner(System.in);
		String s=sc.next();
		boolean a=false,b=false;
		for(int i=0;i<s.length();i++) {
			if(s.charAt(i)=='A') {
				a=true;
			}else if(s.charAt(i)=='B') {
				b=true;
			}
		}
		System.out.println(a&&b? "Yes":"No");
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc =new Scanner(System.in);
		String s=sc.next();
		boolean a=false,b=false;
		for(int i=0;i<s.length();i++) {
			if(s.charAt(i)=='A') {
				a=true;
			}else if(s.charAt(i)=='B') {
				b=true;
			}
		}
		System.out.println(a&&b? "Yes":"No");
	}
} Main
import java.util.*;
public class Main {
	public static void main(String[] args) {
		Scanner sc =new Scanner(System.in);
		String s=sc.next();
		boolean a=false,b=false;
		for(int i=0;i<s.length();i++) {
			if(s.charAt(i)=='A') {
				a=true;
			}else if(s.charAt(i)=='B') {
				b=true;
			}
		}
		System.out.println(a&&b? "Yes":"No");
	}
}
