import java.util.*;

import java.io.*;

public class Main {

	static int n;
	static long memo[][];
	static int p;
	static int pl[][];
	static pair[] a;
	static int k;

	public static long dp(int msk, int idx) {
		if (idx == n)
			return 0;
		if (memo[msk][idx] != -1)
			return memo[msk][idx];
		long max = k - (idx - Integer.bitCount(msk)) > 0 ? dp(msk, idx + 1) + a[idx].x : dp(msk, idx + 1);

		for (int i = 0; i < p; i++) {
			if (((msk >> i) & 1) == 0) {
				max = Math.max(max, pl[a[idx].y][i] + dp(msk | 1 << i, idx + 1));
			}
		}
		return memo[msk][idx] = max;

	}

	public static void main(String[] args) throws NumberFormatException, IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		PrintWriter pw = new PrintWriter(System.out);
		char c[] = br.readLine().toCharArray();
		int a=0;
		int b=0;
		for (int i = 0; i < c.length; i++) {
			if(c[i]=='A')
				a++;
			else
				b++;
		}
		if(a==0||b==0)
			System.out.println("No");
		else
			System.out.println("Yes");
	}

	static int gcd(int a, int b) {
		if (b == 0)
			return a;
		return gcd(b, a % b);
	}

	static class pair {
		int x;
		int y;

		pair(int r, int t) {
			x = r;
			y = t;
		}

		public String toString() {
			return "(" + x + "," + y + ")";
		}

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

	static int n;
	static long memo[][];
	static int p;
	static int pl[][];
	static pair[] a;
	static int k;

	public static long dp(int msk, int idx) {
		if (idx == n)
			return 0;
		if (memo[msk][idx] != -1)
			return memo[msk][idx];
		long max = k - (idx - Integer.bitCount(msk)) > 0 ? dp(msk, idx + 1) + a[idx].x : dp(msk, idx + 1);

		for (int i = 0; i < p; i++) {
			if (((msk >> i) & 1) == 0) {
				max = Math.max(max, pl[a[idx].y][i] + dp(msk | 1 << i, idx + 1));
			}
		}
		return memo[msk][idx] = max;

	}

	public static void main(String[] args) throws NumberFormatException, IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		PrintWriter pw = new PrintWriter(System.out);
		char c[] = br.readLine().toCharArray();
		int a=0;
		int b=0;
		for (int i = 0; i < c.length; i++) {
			if(c[i]=='A')
				a++;
			else
				b++;
		}
		if(a==0||b==0)
			System.out.println("No");
		else
			System.out.println("Yes");
	}

	static int gcd(int a, int b) {
		if (b == 0)
			return a;
		return gcd(b, a % b);
	}

	static class pair {
		int x;
		int y;

		pair(int r, int t) {
			x = r;
			y = t;
		}

		public String toString() {
			return "(" + x + "," + y + ")";
		}

	}
} Main static int n; n static long memo[][]; memo static int p; p static int pl[][]; pl static pair[] a; a static int k; k public static long dp(int msk, int idx) {
		if (idx == n)
			return 0;
		if (memo[msk][idx] != -1)
			return memo[msk][idx];
		long max = k - (idx - Integer.bitCount(msk)) > 0 ? dp(msk, idx + 1) + a[idx].x : dp(msk, idx + 1);

		for (int i = 0; i < p; i++) {
			if (((msk >> i) & 1) == 0) {
				max = Math.max(max, pl[a[idx].y][i] + dp(msk | 1 << i, idx + 1));
			}
		}
		return memo[msk][idx] = max;

	} dp {
		if (idx == n)
			return 0;
		if (memo[msk][idx] != -1)
			return memo[msk][idx];
		long max = k - (idx - Integer.bitCount(msk)) > 0 ? dp(msk, idx + 1) + a[idx].x : dp(msk, idx + 1);

		for (int i = 0; i < p; i++) {
			if (((msk >> i) & 1) == 0) {
				max = Math.max(max, pl[a[idx].y][i] + dp(msk | 1 << i, idx + 1));
			}
		}
		return memo[msk][idx] = max;

	} if (idx == n)
			return 0; idx == n idx n return 0; 0 if (memo[msk][idx] != -1)
			return memo[msk][idx]; memo[msk][idx] != -1 memo[msk][idx] memo[msk] memo msk idx -1 1 return memo[msk][idx]; memo[msk][idx] memo[msk] memo msk idx long max = k - (idx - Integer.bitCount(msk)) > 0 ? dp(msk, idx + 1) + a[idx].x : dp(msk, idx + 1); max k - (idx - Integer.bitCount(msk)) > 0 ? dp(msk, idx + 1) + a[idx].x : dp(msk, idx + 1) k - (idx - Integer.bitCount(msk)) > 0 k - (idx - Integer.bitCount(msk)) k (idx - Integer.bitCount(msk)) idx Integer.bitCount(msk) Integer.bitCount Integer msk 0 dp(msk, idx + 1) + a[idx].x dp(msk, idx + 1) dp msk idx + 1 idx 1 a[idx].x a[idx] a idx a[idx].x dp(msk, idx + 1) dp msk idx + 1 idx 1 for (int i = 0; i < p; i++) {
			if (((msk >> i) & 1) == 0) {
				max = Math.max(max, pl[a[idx].y][i] + dp(msk | 1 << i, idx + 1));
			}
		} int i = 0; int i = 0; i 0 i < p i p i++ i++ i {
			if (((msk >> i) & 1) == 0) {
				max = Math.max(max, pl[a[idx].y][i] + dp(msk | 1 << i, idx + 1));
			}
		} {
			if (((msk >> i) & 1) == 0) {
				max = Math.max(max, pl[a[idx].y][i] + dp(msk | 1 << i, idx + 1));
			}
		} if (((msk >> i) & 1) == 0) {
				max = Math.max(max, pl[a[idx].y][i] + dp(msk | 1 << i, idx + 1));
			} ((msk >> i) & 1) == 0 ((msk >> i) & 1) (msk >> i) msk i 1 0 {
				max = Math.max(max, pl[a[idx].y][i] + dp(msk | 1 << i, idx + 1));
			} max = Math.max(max, pl[a[idx].y][i] + dp(msk | 1 << i, idx + 1)) max Math.max(max, pl[a[idx].y][i] + dp(msk | 1 << i, idx + 1)) Math.max Math max pl[a[idx].y][i] + dp(msk | 1 << i, idx + 1) pl[a[idx].y][i] pl[a[idx].y] pl a[idx].y a[idx] a idx a[idx].y i dp(msk | 1 << i, idx + 1) dp msk | 1 << i msk 1 << i 1 i idx + 1 idx 1 return memo[msk][idx] = max; memo[msk][idx] = max memo[msk][idx] memo[msk] memo msk idx max int msk msk int idx idx public static void main(String[] args) throws NumberFormatException, IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		PrintWriter pw = new PrintWriter(System.out);
		char c[] = br.readLine().toCharArray();
		int a=0;
		int b=0;
		for (int i = 0; i < c.length; i++) {
			if(c[i]=='A')
				a++;
			else
				b++;
		}
		if(a==0||b==0)
			System.out.println("No");
		else
			System.out.println("Yes");
	} main {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		PrintWriter pw = new PrintWriter(System.out);
		char c[] = br.readLine().toCharArray();
		int a=0;
		int b=0;
		for (int i = 0; i < c.length; i++) {
			if(c[i]=='A')
				a++;
			else
				b++;
		}
		if(a==0||b==0)
			System.out.println("No");
		else
			System.out.println("Yes");
	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) PrintWriter pw = new PrintWriter(System.out); pw new PrintWriter(System.out) char c[] = br.readLine().toCharArray(); c br.readLine().toCharArray() br.readLine().toCharArray br.readLine() br.readLine br int a=0; a 0 int b=0; b 0 for (int i = 0; i < c.length; i++) {
			if(c[i]=='A')
				a++;
			else
				b++;
		} int i = 0; int i = 0; i 0 i < c.length i c.length c c.length i++ i++ i {
			if(c[i]=='A')
				a++;
			else
				b++;
		} {
			if(c[i]=='A')
				a++;
			else
				b++;
		} if(c[i]=='A')
				a++;
			else
				b++; c[i]=='A' c[i] c i 'A' a++ a b++ b if(a==0||b==0)
			System.out.println("No");
		else
			System.out.println("Yes"); a==0||b==0 a==0 a 0 b==0 b 0 System.out.println("No") System.out.println System.out System System.out "No" System.out.println("Yes") System.out.println System.out System System.out "Yes" String[] args args static int gcd(int a, int b) {
		if (b == 0)
			return a;
		return gcd(b, a % b);
	} gcd {
		if (b == 0)
			return a;
		return gcd(b, a % b);
	} if (b == 0)
			return a; b == 0 b 0 return a; a return gcd(b, a % b); gcd(b, a % b) gcd b a % b a b int a a int b b static class pair {
		int x;
		int y;

		pair(int r, int t) {
			x = r;
			y = t;
		}

		public String toString() {
			return "(" + x + "," + y + ")";
		}

	} pair int x; x int y; y pair(int r, int t) {
			x = r;
			y = t;
		} pair {
			x = r;
			y = t;
		} x = r x r y = t y t int r r int t t public String toString() {
			return "(" + x + "," + y + ")";
		} toString {
			return "(" + x + "," + y + ")";
		} return "(" + x + "," + y + ")"; "(" + x + "," + y + ")" y "," "(" + x + "," + y + ")" "(" x "," y ")" public class Main {

	static int n;
	static long memo[][];
	static int p;
	static int pl[][];
	static pair[] a;
	static int k;

	public static long dp(int msk, int idx) {
		if (idx == n)
			return 0;
		if (memo[msk][idx] != -1)
			return memo[msk][idx];
		long max = k - (idx - Integer.bitCount(msk)) > 0 ? dp(msk, idx + 1) + a[idx].x : dp(msk, idx + 1);

		for (int i = 0; i < p; i++) {
			if (((msk >> i) & 1) == 0) {
				max = Math.max(max, pl[a[idx].y][i] + dp(msk | 1 << i, idx + 1));
			}
		}
		return memo[msk][idx] = max;

	}

	public static void main(String[] args) throws NumberFormatException, IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		PrintWriter pw = new PrintWriter(System.out);
		char c[] = br.readLine().toCharArray();
		int a=0;
		int b=0;
		for (int i = 0; i < c.length; i++) {
			if(c[i]=='A')
				a++;
			else
				b++;
		}
		if(a==0||b==0)
			System.out.println("No");
		else
			System.out.println("Yes");
	}

	static int gcd(int a, int b) {
		if (b == 0)
			return a;
		return gcd(b, a % b);
	}

	static class pair {
		int x;
		int y;

		pair(int r, int t) {
			x = r;
			y = t;
		}

		public String toString() {
			return "(" + x + "," + y + ")";
		}

	}
} public class Main {

	static int n;
	static long memo[][];
	static int p;
	static int pl[][];
	static pair[] a;
	static int k;

	public static long dp(int msk, int idx) {
		if (idx == n)
			return 0;
		if (memo[msk][idx] != -1)
			return memo[msk][idx];
		long max = k - (idx - Integer.bitCount(msk)) > 0 ? dp(msk, idx + 1) + a[idx].x : dp(msk, idx + 1);

		for (int i = 0; i < p; i++) {
			if (((msk >> i) & 1) == 0) {
				max = Math.max(max, pl[a[idx].y][i] + dp(msk | 1 << i, idx + 1));
			}
		}
		return memo[msk][idx] = max;

	}

	public static void main(String[] args) throws NumberFormatException, IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		PrintWriter pw = new PrintWriter(System.out);
		char c[] = br.readLine().toCharArray();
		int a=0;
		int b=0;
		for (int i = 0; i < c.length; i++) {
			if(c[i]=='A')
				a++;
			else
				b++;
		}
		if(a==0||b==0)
			System.out.println("No");
		else
			System.out.println("Yes");
	}

	static int gcd(int a, int b) {
		if (b == 0)
			return a;
		return gcd(b, a % b);
	}

	static class pair {
		int x;
		int y;

		pair(int r, int t) {
			x = r;
			y = t;
		}

		public String toString() {
			return "(" + x + "," + y + ")";
		}

	}
} Main
import java.util.*;

import java.io.*;

public class Main {

	static int n;
	static long memo[][];
	static int p;
	static int pl[][];
	static pair[] a;
	static int k;

	public static long dp(int msk, int idx) {
		if (idx == n)
			return 0;
		if (memo[msk][idx] != -1)
			return memo[msk][idx];
		long max = k - (idx - Integer.bitCount(msk)) > 0 ? dp(msk, idx + 1) + a[idx].x : dp(msk, idx + 1);

		for (int i = 0; i < p; i++) {
			if (((msk >> i) & 1) == 0) {
				max = Math.max(max, pl[a[idx].y][i] + dp(msk | 1 << i, idx + 1));
			}
		}
		return memo[msk][idx] = max;

	}

	public static void main(String[] args) throws NumberFormatException, IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		PrintWriter pw = new PrintWriter(System.out);
		char c[] = br.readLine().toCharArray();
		int a=0;
		int b=0;
		for (int i = 0; i < c.length; i++) {
			if(c[i]=='A')
				a++;
			else
				b++;
		}
		if(a==0||b==0)
			System.out.println("No");
		else
			System.out.println("Yes");
	}

	static int gcd(int a, int b) {
		if (b == 0)
			return a;
		return gcd(b, a % b);
	}

	static class pair {
		int x;
		int y;

		pair(int r, int t) {
			x = r;
			y = t;
		}

		public String toString() {
			return "(" + x + "," + y + ")";
		}

	}
}