/*
javac Main.java && java Main
*/

import java.io.*;
import java.math.*;
import java.util.*;

public class Main {
	public static void main(String[] args) { new Main(); }
	FS in = new FS();
	PrintWriter out = new PrintWriter(System.out);

	char[] s;
	int[] f;
	
	Main() {
		s = in.next().toCharArray();
		f = new int[2];
		for (char c : s) f[c - 'A']++;
		if (f[0] == 0 || f[0] == 3)	out.println("No");
		else out.println("Yes");
		out.close();
	}

	
	
	int abs(int x) { if (x < 0) return -x; return x; }
	long abs(long x) { if (x < 0) return -x; return x; }
	int max(int x, int y) { if (x < y) return y; return x; }
	int min(int x, int y) { if (x > y) return y; return x; }
	long max(long x, long y) { if (x < y) return y; return x; }
	long min(long x, long y) { if (x > y) return y; return x; }
	int gcd(int x, int y) { while (y > 0) { x = y^(x^(y = x)); y %= x; } return x; }
	long gcd(long x, long y) { while (y > 0) { x = y^(x^(y = x)); y %= x; } return x; }
	long lcm(int x, int y) { return ((long) x) * (y / gcd(x, y)); }
	long lcm(long x, long y) { return x * (y / gcd(x, y)); }

	class FS {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st = new StringTokenizer("");
		String next() {
			while (!st.hasMoreTokens()) {
				try { st = new StringTokenizer(br.readLine()); }
				catch (Exception e) {}
			} return st.nextToken();
		}
		int nextInt() { return Integer.parseInt(next()); }
		long nextLong() { return Long.parseLong(next()); }
		double nextDouble() { return Double.parseDouble(next()); }
	}
} import java.io.*; io.* java import java.math.*; math.* java import java.util.*; util.* java public class Main {
	public static void main(String[] args) { new Main(); }
	FS in = new FS();
	PrintWriter out = new PrintWriter(System.out);

	char[] s;
	int[] f;
	
	Main() {
		s = in.next().toCharArray();
		f = new int[2];
		for (char c : s) f[c - 'A']++;
		if (f[0] == 0 || f[0] == 3)	out.println("No");
		else out.println("Yes");
		out.close();
	}

	
	
	int abs(int x) { if (x < 0) return -x; return x; }
	long abs(long x) { if (x < 0) return -x; return x; }
	int max(int x, int y) { if (x < y) return y; return x; }
	int min(int x, int y) { if (x > y) return y; return x; }
	long max(long x, long y) { if (x < y) return y; return x; }
	long min(long x, long y) { if (x > y) return y; return x; }
	int gcd(int x, int y) { while (y > 0) { x = y^(x^(y = x)); y %= x; } return x; }
	long gcd(long x, long y) { while (y > 0) { x = y^(x^(y = x)); y %= x; } return x; }
	long lcm(int x, int y) { return ((long) x) * (y / gcd(x, y)); }
	long lcm(long x, long y) { return x * (y / gcd(x, y)); }

	class FS {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st = new StringTokenizer("");
		String next() {
			while (!st.hasMoreTokens()) {
				try { st = new StringTokenizer(br.readLine()); }
				catch (Exception e) {}
			} return st.nextToken();
		}
		int nextInt() { return Integer.parseInt(next()); }
		long nextLong() { return Long.parseLong(next()); }
		double nextDouble() { return Double.parseDouble(next()); }
	}
} Main FS in = new FS(); in new FS() PrintWriter out = new PrintWriter(System.out); out new PrintWriter(System.out) char[] s; s int[] f; f public static void main(String[] args) { new Main(); } main { new Main(); } new Main() String[] args args Main() {
		s = in.next().toCharArray();
		f = new int[2];
		for (char c : s) f[c - 'A']++;
		if (f[0] == 0 || f[0] == 3)	out.println("No");
		else out.println("Yes");
		out.close();
	} Main {
		s = in.next().toCharArray();
		f = new int[2];
		for (char c : s) f[c - 'A']++;
		if (f[0] == 0 || f[0] == 3)	out.println("No");
		else out.println("Yes");
		out.close();
	} s = in.next().toCharArray() s in.next().toCharArray() in.next().toCharArray in.next() in.next in f = new int[2] f new int[2] 2 for (char c : s) f[c - 'A']++; char c s f[c - 'A']++; f[c - 'A']++ f[c - 'A'] f c - 'A' c 'A' if (f[0] == 0 || f[0] == 3)	out.println("No");
		else out.println("Yes"); f[0] == 0 || f[0] == 3 f[0] == 0 f[0] f 0 0 f[0] == 3 f[0] f 0 3 out.println("No") out.println out "No" out.println("Yes") out.println out "Yes" out.close() out.close out int abs(int x) { if (x < 0) return -x; return x; } abs { if (x < 0) return -x; return x; } if (x < 0) return -x; x < 0 x 0 return -x; -x x return x; x int x x long abs(long x) { if (x < 0) return -x; return x; } abs { if (x < 0) return -x; return x; } if (x < 0) return -x; x < 0 x 0 return -x; -x x return x; x long x x int max(int x, int y) { if (x < y) return y; return x; } max { if (x < y) return y; return x; } if (x < y) return y; x < y x y return y; y return x; x int x x int y y int min(int x, int y) { if (x > y) return y; return x; } min { if (x > y) return y; return x; } if (x > y) return y; x > y x y return y; y return x; x int x x int y y long max(long x, long y) { if (x < y) return y; return x; } max { if (x < y) return y; return x; } if (x < y) return y; x < y x y return y; y return x; x long x x long y y long min(long x, long y) { if (x > y) return y; return x; } min { if (x > y) return y; return x; } if (x > y) return y; x > y x y return y; y return x; x long x x long y y int gcd(int x, int y) { while (y > 0) { x = y^(x^(y = x)); y %= x; } return x; } gcd { while (y > 0) { x = y^(x^(y = x)); y %= x; } return x; } while (y > 0) { x = y^(x^(y = x)); y %= x; } y > 0 y 0 { x = y^(x^(y = x)); y %= x; } x = y^(x^(y = x)) x y^(x^(y = x)) y (x^(y = x)) x (y = x) y x y %= x y x return x; x int x x int y y long gcd(long x, long y) { while (y > 0) { x = y^(x^(y = x)); y %= x; } return x; } gcd { while (y > 0) { x = y^(x^(y = x)); y %= x; } return x; } while (y > 0) { x = y^(x^(y = x)); y %= x; } y > 0 y 0 { x = y^(x^(y = x)); y %= x; } x = y^(x^(y = x)) x y^(x^(y = x)) y (x^(y = x)) x (y = x) y x y %= x y x return x; x long x x long y y long lcm(int x, int y) { return ((long) x) * (y / gcd(x, y)); } lcm { return ((long) x) * (y / gcd(x, y)); } return ((long) x) * (y / gcd(x, y)); ((long) x) * (y / gcd(x, y)) ((long) x) (y / gcd(x, y)) y gcd(x, y) gcd x y int x x int y y long lcm(long x, long y) { return x * (y / gcd(x, y)); } lcm { return x * (y / gcd(x, y)); } return x * (y / gcd(x, y)); x * (y / gcd(x, y)) x (y / gcd(x, y)) y gcd(x, y) gcd x y long x x long y y class FS {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st = new StringTokenizer("");
		String next() {
			while (!st.hasMoreTokens()) {
				try { st = new StringTokenizer(br.readLine()); }
				catch (Exception e) {}
			} return st.nextToken();
		}
		int nextInt() { return Integer.parseInt(next()); }
		long nextLong() { return Long.parseLong(next()); }
		double nextDouble() { return Double.parseDouble(next()); }
	} FS BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) StringTokenizer st = new StringTokenizer(""); st new StringTokenizer("") String next() {
			while (!st.hasMoreTokens()) {
				try { st = new StringTokenizer(br.readLine()); }
				catch (Exception e) {}
			} return st.nextToken();
		} next {
			while (!st.hasMoreTokens()) {
				try { st = new StringTokenizer(br.readLine()); }
				catch (Exception e) {}
			} return st.nextToken();
		} while (!st.hasMoreTokens()) {
				try { st = new StringTokenizer(br.readLine()); }
				catch (Exception e) {}
			} !st.hasMoreTokens() st.hasMoreTokens() st.hasMoreTokens st {
				try { st = new StringTokenizer(br.readLine()); }
				catch (Exception e) {}
			} try { st = new StringTokenizer(br.readLine()); }
				catch (Exception e) {} catch (Exception e) {} Exception e {} { st = new StringTokenizer(br.readLine()); } st = new StringTokenizer(br.readLine()) st new StringTokenizer(br.readLine()) return st.nextToken(); st.nextToken() st.nextToken st int nextInt() { return Integer.parseInt(next()); } nextInt { return Integer.parseInt(next()); } return Integer.parseInt(next()); Integer.parseInt(next()) Integer.parseInt Integer next() next long nextLong() { return Long.parseLong(next()); } nextLong { return Long.parseLong(next()); } return Long.parseLong(next()); Long.parseLong(next()) Long.parseLong Long next() next double nextDouble() { return Double.parseDouble(next()); } nextDouble { return Double.parseDouble(next()); } return Double.parseDouble(next()); Double.parseDouble(next()) Double.parseDouble Double next() next public class Main {
	public static void main(String[] args) { new Main(); }
	FS in = new FS();
	PrintWriter out = new PrintWriter(System.out);

	char[] s;
	int[] f;
	
	Main() {
		s = in.next().toCharArray();
		f = new int[2];
		for (char c : s) f[c - 'A']++;
		if (f[0] == 0 || f[0] == 3)	out.println("No");
		else out.println("Yes");
		out.close();
	}

	
	
	int abs(int x) { if (x < 0) return -x; return x; }
	long abs(long x) { if (x < 0) return -x; return x; }
	int max(int x, int y) { if (x < y) return y; return x; }
	int min(int x, int y) { if (x > y) return y; return x; }
	long max(long x, long y) { if (x < y) return y; return x; }
	long min(long x, long y) { if (x > y) return y; return x; }
	int gcd(int x, int y) { while (y > 0) { x = y^(x^(y = x)); y %= x; } return x; }
	long gcd(long x, long y) { while (y > 0) { x = y^(x^(y = x)); y %= x; } return x; }
	long lcm(int x, int y) { return ((long) x) * (y / gcd(x, y)); }
	long lcm(long x, long y) { return x * (y / gcd(x, y)); }

	class FS {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st = new StringTokenizer("");
		String next() {
			while (!st.hasMoreTokens()) {
				try { st = new StringTokenizer(br.readLine()); }
				catch (Exception e) {}
			} return st.nextToken();
		}
		int nextInt() { return Integer.parseInt(next()); }
		long nextLong() { return Long.parseLong(next()); }
		double nextDouble() { return Double.parseDouble(next()); }
	}
} public class Main {
	public static void main(String[] args) { new Main(); }
	FS in = new FS();
	PrintWriter out = new PrintWriter(System.out);

	char[] s;
	int[] f;
	
	Main() {
		s = in.next().toCharArray();
		f = new int[2];
		for (char c : s) f[c - 'A']++;
		if (f[0] == 0 || f[0] == 3)	out.println("No");
		else out.println("Yes");
		out.close();
	}

	
	
	int abs(int x) { if (x < 0) return -x; return x; }
	long abs(long x) { if (x < 0) return -x; return x; }
	int max(int x, int y) { if (x < y) return y; return x; }
	int min(int x, int y) { if (x > y) return y; return x; }
	long max(long x, long y) { if (x < y) return y; return x; }
	long min(long x, long y) { if (x > y) return y; return x; }
	int gcd(int x, int y) { while (y > 0) { x = y^(x^(y = x)); y %= x; } return x; }
	long gcd(long x, long y) { while (y > 0) { x = y^(x^(y = x)); y %= x; } return x; }
	long lcm(int x, int y) { return ((long) x) * (y / gcd(x, y)); }
	long lcm(long x, long y) { return x * (y / gcd(x, y)); }

	class FS {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st = new StringTokenizer("");
		String next() {
			while (!st.hasMoreTokens()) {
				try { st = new StringTokenizer(br.readLine()); }
				catch (Exception e) {}
			} return st.nextToken();
		}
		int nextInt() { return Integer.parseInt(next()); }
		long nextLong() { return Long.parseLong(next()); }
		double nextDouble() { return Double.parseDouble(next()); }
	}
} Main
/*
javac Main.java && java Main
*/

import java.io.*;
import java.math.*;
import java.util.*;

public class Main {
	public static void main(String[] args) { new Main(); }
	FS in = new FS();
	PrintWriter out = new PrintWriter(System.out);

	char[] s;
	int[] f;
	
	Main() {
		s = in.next().toCharArray();
		f = new int[2];
		for (char c : s) f[c - 'A']++;
		if (f[0] == 0 || f[0] == 3)	out.println("No");
		else out.println("Yes");
		out.close();
	}

	
	
	int abs(int x) { if (x < 0) return -x; return x; }
	long abs(long x) { if (x < 0) return -x; return x; }
	int max(int x, int y) { if (x < y) return y; return x; }
	int min(int x, int y) { if (x > y) return y; return x; }
	long max(long x, long y) { if (x < y) return y; return x; }
	long min(long x, long y) { if (x > y) return y; return x; }
	int gcd(int x, int y) { while (y > 0) { x = y^(x^(y = x)); y %= x; } return x; }
	long gcd(long x, long y) { while (y > 0) { x = y^(x^(y = x)); y %= x; } return x; }
	long lcm(int x, int y) { return ((long) x) * (y / gcd(x, y)); }
	long lcm(long x, long y) { return x * (y / gcd(x, y)); }

	class FS {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st = new StringTokenizer("");
		String next() {
			while (!st.hasMoreTokens()) {
				try { st = new StringTokenizer(br.readLine()); }
				catch (Exception e) {}
			} return st.nextToken();
		}
		int nextInt() { return Integer.parseInt(next()); }
		long nextLong() { return Long.parseLong(next()); }
		double nextDouble() { return Double.parseDouble(next()); }
	}
}
