Problem:
 Score : 100 points    Problem Statement In AtCoder City, there are three stations numbered 1 , 2 , and 3 .  Each of these stations is operated by one of the two railway companies, A and B. A string S of length 3 represents which company operates each station. If S_i is A , Company A operates Station i ; if S_i is B , Company B operates Station i .  To improve the transportation condition, for each pair of a station operated by Company A and one operated by Company B, there will be a bus service connecting them.  Determine if there is a pair of stations that will be connected by a bus service.      Constraints  Each character of S is A or B .  |S| = 3         Input Input is given from Standard Input in the following format:  S       Output If there is a pair of stations that will be connected by a bus service, print Yes ; otherwise, print No .        Sample Input 1 ABA      Sample Output 1 Yes  Company A operates Station 1 and 3 , while Company B operates Station 2 .  There will be a bus service between Station 1 and 2 , and between Station 2 and 3 , so print Yes .       Sample Input 2 BBA      Sample Output 2 Yes  Company B operates Station 1 and 2 , while Company A operates Station 3 .  There will be a bus service between Station 1 and 3 , and between Station 2 and 3 , so print Yes .       Sample Input 3 BBB      Sample Output 3 No  Company B operates all the stations. Thus, there will be no bus service, so print No .

Solution (Python):
from heapq import heappush, heappop, heapify
from collections import deque, defaultdict, Counter
import itertools
from itertools import permutations, combinations, accumulate
import sys
import bisect
import string
import math
import time


def I(): return int(input())


def S(): return input()


def MI(): return map(int, input().split())


def MS(): return map(str, input().split())


def LI(): return [int(i) for i in input().split()]


def LI_(): return [int(i)-1 for i in input().split()]


def StoI(): return [ord(i)-97 for i in input()]


def ItoS(nn): return chr(nn+97)


def input(): return sys.stdin.readline().rstrip()


def show(*inp, end='\n'):
    if show_flg:
        print(*inp, end=end)


YNL = {False: 'No', True: 'Yes'}
YNU = {False: 'NO', True: 'YES'}
MOD = 10**9+7
inf = float('inf')
IINF = 10**10
l_alp = string.ascii_lowercase
u_alp = string.ascii_uppercase
ts = time.time()
sys.setrecursionlimit(10**6)
nums = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10']

show_flg = False



def main():
    s = S()

    if s == 'AAA' or s == 'BBB':
        print('No')
    else:
        print("Yes")


if __name__ == '__main__':
    main()

Solution (Python):
import math

def makelist(n, m):
    return [[0 for _ in range(m)] for _ in range(n)]





s = input()
if "A" in s and "B" in s:
    print("Yes")
else:
    print("No")

Solution (Python):
s = input()
if s == 'AAA' or s == 'BBB':
    print('No')
else:
    print('Yes')

Solution (Python):
s=input()
if  "A" in s and "B" in s:
    print("Yes")
else:
    print("No")

Solution (Python):
s = input();print(["No","Yes"][len(set(s))-1])

Solution (Python):
S=input()
if S[0] == S[1] == S[2]:
  print("No")
else:
  print("Yes")

Solution (Python):
s=list(input())
if(len(set(s))==1):
    print("No")
else:
    print("Yes")

Solution (Python):
s = input()

if s.count('A') == 3 or s.count('B') == 3:
    print('No')
else:
    print('Yes')

Solution (Python):


import sys
from collections import Counter

def input(): return sys.stdin.readline().strip()
def list2d(a, b, c): return [[c] * b for i in range(a)]
def list3d(a, b, c, d): return [[[d] * c for j in range(b)] for i in range(a)]
def list4d(a, b, c, d, e): return [[[[e] * d for j in range(c)] for j in range(b)] for i in range(a)]
def ceil(x, y=1): return int(-(-x // y))
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(N=None): return list(MAP()) if N is None else [INT() for i in range(N)]
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
sys.setrecursionlimit(10 ** 9)
INF = 10 ** 18
MOD = 10 ** 9 + 7

S = input()

if len(set(S)) == 1:
    No()
else:
    Yes()

Solution (Python):
s = input()
if all((s[0] == i for i in s)):
    print('No')
else:
    print('Yes')

Solution (Python):
s = input()
if s[0] != s[1] or s[1] != s[2]:
    print("Yes")
else:
    print("No")

Solution (Python):
S = input()
if S == "AAA" or S=="BBB":
    print("No")
else:print("Yes")

Solution (Python):
S = input()

if S == "A"*3 or S == "B"*3:
    print("No")
else:
    print("Yes")

Solution (Python):
s = set(input())
print('No' if len(s) == 1 else 'Yes')

Solution (Python):
S = input()

print("Yes" if len(set(S)) >= 2 else "No")

Solution (Python):
x = input()
if (x=='AAA') or (x=='BBB'):
    print('No')
else:
    print('Yes')

Solution (Python):
S = input()
if S in ["AAA", "BBB"]:
    print("No")
else:
    print("Yes")

Solution (Python):
s = list(input())
ss = list(set(s))
print('Yes' if len(ss) > 1 else 'No')

Solution (Python):
S = input().strip()
print("Yes" if len(set(list(S))) > 1 else "No")

Solution (Python):
Ss = input()

if Ss == 'AAA' or Ss == 'BBB':
    print('No')
else:
    print('Yes')

Solution (Python):


import sys
import math
import collections
import itertools
from inspect import currentframe
INF = 10 ** 10
MOD = 10 ** 9 + 7
def input() : return sys.stdin.readline().strip()
def gcd(x, y) : return y if x % y == 0 else gcd(y, x % y)
def lcm(x, y) : return (x * y) // gcd(x, y)
def I() : return int(input())
def MI() : return map(int, input().split())
def LI() : return [int(x) for x in input().split()]
def RI(N) : return [int(input()) for _ in range(N)]
def LRI(N) : return [[int(x) for x in input().split()] for _ in range(N)]
def chkprint(*args) : names = {id(v):k for k,v in currentframe().f_back.f_locals.items()}; print(', '.join(names.get(id(arg),'???')+' = '+repr(arg) for arg in args))

S = input()

print("No" if (S == "AAA" or S == "BBB") else "Yes")

Solution (Python):
S = input()
print('No') if S in ['AAA', 'BBB'] else print('Yes')

Solution (Python):
S = input()
if S == "AAA" or S == "BBB":
    print("No")
else:
    print("Yes")

Solution (Python):
S = input()

if len(set(list(S)))==2:
    print("Yes")
else:
    print("No")

Solution (Python):
s=input()
if "A" in s and "B" in s:
    print("Yes")
else:
    print("No")

Solution (Python):
S = str(input())


if S.count("A") > 0 and S.count("B") > 0:
  print("Yes")
else:
  print("No")

Solution (Python):
s = input()
ans = 'Yes'
if s == 'AAA' or s == 'BBB':
    ans = 'No'
print(ans)

Solution (Python):
S = input()

if S[0] == S[1] and S[1] == S[2]: print("No")
else: print("Yes")

Solution (Python):
S=input()
if S=="BBB" or S=="AAA":
  print("No")
else:
  print("Yes")

Solution (Python):
N = str(input())



if N[0]==N[1]==N[2]:
    print('No')
else:
    print('Yes')

Solution (Python):
s = input()
if "A" in s and "B" in s: print("Yes")
else: print("No")

Solution (Python):
S = input()
if S == "AAA" or S == "BBB":
    print("No")
else:
    print("Yes")

Solution (Python):

import sys
import math
from bisect import bisect_left
from bisect import bisect_right
import collections
import copy
import heapq
from collections import defaultdict
from heapq import heappop, heappush
import itertools
input = sys.stdin.readline

























def inputInt(): return int(input())
def inputMap(): return map(int, input().split())
def inputList(): return list(map(int, input().split()))

inf = float('inf')
mod = 1000000007




def main():
	S = input()
	S = S[:-1]

	if S == "AAA" or S == "BBB":
		print("No")
	else:
		print("Yes")

	








def combination(n, r, mod=10**9+7):
    r = min(r, n-r)
    res = 1
    for i in range(r):
        res = res * (n - i) * modinv(i+1, mod) % mod
    return res


def modinv(a, mod=10**9+7):
    return pow(a, mod-2, mod)

def egcd(a, b):
    if a == 0:
        return b, 0, 1
    else:
        g, y, x = egcd(b % a, a)
        return g, x - (b // a) * y, y



def H(n, r, mod=10**9+7):
	
	
    return combination(n+r-1, r, mod)

class Combination:
    """
    O(n)の前計算を1回行うことで，O(1)でnCr mod mを求められる
    n_max = 10**6のとき前処理は約950ms (PyPyなら約340ms, 10**7で約1800ms)
    使用例：
    comb = Combination(1000000)
    print(comb(5, 3))  
    """
    def __init__(self, n_max, mod=10**9+7):
        self.mod = mod
        self.modinv = self.make_modinv_list(n_max)
        self.fac, self.facinv = self.make_factorial_list(n_max)

    def __call__(self, n, r):
        return self.fac[n] * self.facinv[r] % self.mod * self.facinv[n-r] % self.mod

    def make_factorial_list(self, n):
        
        
        fac = [1]
        facinv = [1]
        for i in range(1, n+1):
            fac.append(fac[i-1] * i % self.mod)
            facinv.append(facinv[i-1] * self.modinv[i] % self.mod)
        return fac, facinv

    def make_modinv_list(self, n):
        
        modinv = [0] * (n+1)
        modinv[1] = 1
        for i in range(2, n+1):
            modinv[i] = self.mod - self.mod//i * modinv[self.mod%i] % self.mod
        return modinv

if __name__ == "__main__":
	main()

Solution (Python):

s = input()

if len(set(s)) == 1:
    print('No')
else:
    print('Yes')

Solution (Python):
s = set(input())
if len(s) == 1:
    print("No")
else:
    print("Yes")

Solution (Python):
S = list(input())
if ("A" in S) and ("B" in S):
    print("Yes")
else:
    print("No")

Solution (Python):
if len(set(input())) == 2:
    print("Yes")
else:
    print("No")

Solution (Python):
s = input()
if(s[0] == s[1] == s[2]):
    print("No")
else:
    print("Yes")

Solution (Python):

import sys, math, itertools, collections, bisect
input = lambda: sys.stdin.buffer.readline().rstrip().decode('utf-8')
inf = float('inf') ;mod = 10**9+7
mans = inf ;ans = 0 ;count = 0 ;pro = 1

s = input()
S = {"A","B"}
s1 = {s[0],s[1]}
s2 = {s[2],s[1]}
if s1 == S or s2 == S:
  print("Yes")
else:
  print("No")

Solution (Python):
s=list(input())
if len(set(s))==2:
    print("Yes")
else:
    print("No")

Solution (Python):
from sys import stdin
s = stdin.readline().rstrip()
if s[0] == s[1] == s[2]:
    print("No")
else:
    print("Yes")

Solution (Python):
S=input()
if S[0]==S[1]==S[2]:
  print('No')
else:
  print('Yes')

Solution (Python):
s = list(input())
s = set(s)
if len(s) == 1:
    print("No")
else:
    print("Yes")

Solution (Python):
S=input()
print("Yes" if len(set(S))==2 else "No")

Solution (Python):


S = input()

if S == 'AAA' or S == 'BBB':
    print('No')
else:
    print('Yes')

Solution (Python):
s=list(input())
t=set(s)
if len(t)==1:
    print("No")
else:
    print("Yes")

Solution (Python):
s = input()
if s == 'AAA' or s == 'BBB':
    print('No')
else:
    print('Yes')

Solution (Python):
a = set(input())
if len(a) == 1:
    print("No")
else:
    print("Yes")

Solution (Python):
s = input()
if s == "AAA" or s == "BBB":
    print("No")
else:
    print("Yes")

Solution (Python):

import sys

YES = "Yes"  
NO = "No"  


def solve(S: str):
    print(NO if S[0] == S[1] and S[1] == S[2] else YES)



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    S = next(tokens)  
    solve(S)

if __name__ == '__main__':
    main()

Solution (Python):
s=input()
if (s=="AAA")|(s=="BBB"):
    print("No")
else:print("Yes")

Solution (Python):

import bisect
import heapq
import math
import random
import sys
from collections import Counter, defaultdict, deque
from decimal import ROUND_CEILING, ROUND_HALF_UP, Decimal
from functools import lru_cache, reduce
from itertools import combinations, combinations_with_replacement, product, permutations
from operator import add, mul, sub

sys.setrecursionlimit(100000)
input = sys.stdin.readline
INF = 2**62-1

def read_int():
    return int(input())


def read_int_n():
    return list(map(int, input().split()))


def read_float():
    return float(input())


def read_float_n():
    return list(map(float, input().split()))


def read_str():
    return input().strip()


def read_str_n():
    return list(map(str, input().split()))


def error_print(*args):
    print(*args, file=sys.stderr)


def mt(f):
    import time

    def wrap(*args, **kwargs):
        s = time.time()
        ret = f(*args, **kwargs)
        e = time.time()

        error_print(e - s, 'sec')
        return ret

    return wrap


@mt
def slv(S):
    return 'Yes' if len(set(S)) > 1 else 'No'


def main():
    S = read_str()
    print(slv(S))


if __name__ == '__main__':
    main()

Solution (Python):
s = list(input())
if s[0] == s[1] and s[1] == s[2]:
    print("No")
else:
    print("Yes")

Solution (Python):
s = input()
if s[0] == s[1] and s[1] == s[2]:
    print('No')
else:
    print('Yes')

Solution (Python):
import sys

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

S = sr()
print('No' if len(set(S)) == 1 else 'Yes')

Solution (Python):
S = input()
if S == "AAA" or S == "BBB":
    print("No")
else:
    print("Yes")

Solution (Python):
lst = len(list(set(list(map(str, input())))))

if lst == 2:
  print('Yes')
else:
  print('No')

Solution (Python):
import sys, math
def input():
    return sys.stdin.readline()[:-1]
from itertools import permutations, combinations
from collections import defaultdict, Counter
from math import factorial
from bisect import bisect_left 

enu = enumerate

sys.setrecursionlimit(10**7)
S = input()

if S == 'AAA' or S=='BBB':
    print('No')
else:
    print('Yes')

Solution (Python):
s = input()

if s == 'AAA' or s == 'BBB':
    print('No')
else:
    print('Yes')

Solution (Python):
s=input()
if s=="AAA" or s=="BBB":
  print("No")
else:
  print("Yes")

Solution (Python):
s = input()
print('Yes' if s.count('A') <= 2 and s.count('B') <= 2 else 'No')

Solution (Python):
S = input().strip()

if len(set(S)) == 1:
    print('No')
else:
    print('Yes')

Solution (Python):
s=input()
print("No" if s=='AAA' or s=='BBB' else 'Yes')

Solution (Python):
s = list(input())

if s[0] == s[1] and s[1] == s[2]:
    print('No')
else:
    print('Yes')

Solution (Python):



s  = input()
if s=="AAA" or s == "BBB":
    print("No")
else:
    print("Yes")

Solution (Python):
s = input()

if s[0] != s[1]:
    print("Yes")
elif s[1] != s[2]:
    print("Yes")
else:
    print("No")

Solution (Python):
import sys
import os


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

    S = sys.stdin.readline().rstrip()

    print('Yes' if 'A' in S and 'B' in S else 'No')



if __name__ == '__main__':
    main()

Solution (Python):
def examA():
    S = SI()
    if S=="AAA" or S=="BBB":
        print("No")
    else:
        print("Yes")
    return

def examB():
    ans = 0
    print(ans)
    return

def examC():
    ans = 0
    print(ans)
    return

def examD():
    ans = 0
    print(ans)
    return

def examE():
    ans = 0
    print(ans)
    return

def examF():
    ans = 0
    print(ans)
    return

import sys,copy,bisect,itertools,heapq,math,random
from heapq import heappop,heappush,heapify
from collections import Counter,defaultdict,deque
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))
def LSI(): return list(map(str,sys.stdin.readline().split()))
def LS(): return sys.stdin.readline().split()
def SI(): return sys.stdin.readline().strip()
global mod,mod2,inf,alphabet,_ep
mod = 10**9 + 7
mod2 = 998244353
inf = 10**18
_ep = 10**(-12)
alphabet = [chr(ord('a') + i) for i in range(26)]

sys.setrecursionlimit(10**6)

if __name__ == '__main__':
    examA()

"""

"""

Solution (Python):

s = list(input())

if s[0] == s[1] == s[2]:
    print("No")
else:
    print("Yes")

Solution (Python):
s=input()






print('No' if s[0]==s[1]==s[2] else 'Yes')

Solution (Python):
S = input()
print('No') if S in ['AAA','BBB'] else print('Yes')

Solution (Python):
S = input()
if S[0] == S[1] and S[1] == S[2] :
  print('No')
else:
  print('Yes')

Solution (Python):
S = input()
if S == 'AAA' or S == 'BBB':
    print('No')
else:
    print('Yes')

Solution (Python):
import sys
input = sys.stdin.readline

S = input().rstrip()
from collections import Counter

c = Counter(S)

if len(c.keys()) == 2:
    print("Yes")
else:
    print("No")

Solution (Python):


s = input()

if s == 'AAA' or s == 'BBB':
    print('No')
else:
    print('Yes')

Solution (Python):
if len(set(input())) == 2:
    print('Yes')
else:
    print('No')

Solution (Python):
S=input()
t=S[0]
for i in S:
    if t!=i:
        print("Yes")
        break
else:
    print("No")

Solution (Python):
s = list(input())

if len(set(s)) != 1:
  print('Yes')
else:
  print('No')

Solution (Python):
s = list(input())
if len(set(s)) == 2:
    ans = "Yes"
else:
    ans = "No"
print(ans)

Solution (Python):
S = input()
if S == "AAA" or S == "BBB":
    print ("No")
else:
    print ("Yes")

Solution (Python):
S = input()
print("No" if S in ['AAA', 'BBB'] else 'Yes')

Solution (Python):
s = list(input())
if len(set(s)) == 1:
    print("No")
else:
    print("Yes")

Solution (Python):
s = input()
print('Yes' if 'AB' in s or 'BA' in s else 'No')

Solution (Python):
S = list(input())

print('Yes' if len(set(S))!=1 else 'No')

Solution (Python):
s = input()
v = len(set(s))
if v==1:
    print('No')
else:
    print('Yes')

Solution (Python):
S = list(input())
s = set(S)

if len(s) == 1:
    print ('No')
else:
    print ('Yes')

Solution (Python):
import sys
def input(): return sys.stdin.readline().rstrip()
sys.setrecursionlimit(10 ** 7)

S = input()
ans = "No"
for i in range(2):
    if S[i] != S[i+1]:
        ans = "Yes"
print(ans)

Solution (Python):
s = input()

if(s=="AAA" or s=="BBB"):
  print("No")
else:
  print("Yes")

Solution (Python):
s = input()
if 'A' in s and 'B' in s:
  print("Yes")
else:
  print("No")

Solution (Python):
s = list(input())
set_ = set(s)

if len(set_) == 2:
    print("Yes")
else:
    print("No")

Solution (Python):
import sys

stdin = sys.stdin

ns = lambda: stdin.readline().rstrip()
ni = lambda: int(stdin.readline().rstrip())
nm = lambda: map(int, stdin.readline().split())
nl = lambda: list(map(int, stdin.readline().split()))

print('YNeos'[len(set(list(input()))) < 2::2])

Solution (Python):
s = input()


if s == 'AAA' or s == 'BBB':
    print('No')
else:
    print('Yes')

Solution (Python):
def main():
    a = input()
    if a.count("A") in [0, 3]:
        print("No")
    else:
        print("Yes")


main()

Solution (Python):


s = input()


if s[0] != s[1] or s[1] != s[2]:
	print("Yes")
else:
	print("No")

Solution (Python):
s = input()
if 'A' in s and 'B' in s:
    print('Yes')
else:
    print('No')

Solution (Python):
S = input()
print('No' if S=='AAA' or S=='BBB' else 'Yes')

Solution (Python):
S = input()

if len(set(S)) == 1:
    print('No')
else:
    print('Yes')

Solution (Python):
S = input()

if S[0] == S[1] and S[0] == S[2]:
    print('No')
else:
    print('Yes')

Solution (Python):
S = input()
if S == "BBB" or S == "AAA":
    print("No")
else:
    print("Yes")

Solution (Python):
S = input()
s = set()
for x in S:
    s.add(x)
if len(s) == 2:
    print("Yes")
else:
    print("No")

Solution (Python):
s=list(*input().split())

if len(set(s))==2:
    print("Yes")
else:
    print("No")

Solution (Python):
S = input()
if (S[0] == S[1] and S[1] == S[2] and S[2] == S[0]) :
    print("No")
else :
    print("Yes")

Solution (Python):
s=input()
print("Yes" if s!="AAA" and s!="BBB" else "No")

Solution (Python):
if len(set(input())) == 1:
  print("No")
else:
  print("Yes")

Solution (Python):
s = input()
if s == 'AAA' or s == 'BBB':
    print('No')
else:
    print('Yes')

Solution (Python):
def main():
    S = set(input())
    if len(S) == 1:
        print('No')
    else:
        print('Yes')


if __name__ == "__main__":
    main()

Solution (Python):
def main():
    import sys
    
    sys.setrecursionlimit(10000000)
    from collections import Counter, deque
    
    from itertools import combinations, permutations
    
    from bisect import bisect_left,bisect_right
    from math import floor, ceil
    

    

    s = input()
    if len(set(s))==1:
        print('No')
    else:
        print('Yes')



if __name__ == '__main__':
    main()

Solution (Python):
s = input()
if s == "AAA" or s == "BBB":
    print("No")
else:
    print("Yes")

Solution (Python):

s = input()
if s.count("A") != 0 and s.count("B") != 0:
    print("Yes")
else:
    print("No")

Solution (Python):
s=list(input())
print("Yes")if len(set(s))>1 else print("No")

Solution (Python):
s = input()


if s=='AAA' or s=='BBB':
    print('No')
else:
    print('Yes')

Solution (Python):
S = input()

if 'A' in S and 'B' in S:
    print('Yes')
else:
    print('No')

Solution (Python):
import sys
def input(): return sys.stdin.readline().rstrip()

def main():
    S = input()
    if len(set(list(S))) > 1:
        print('Yes')
    else:
        print('No')

if __name__ == '__main__':
    main()

Solution (Python):
S=input()

if "AB" in S or "BA" in S:
  print("Yes")
else:
  print("No")

Solution (Python):
import sys,collections as cl,bisect as bs
sys.setrecursionlimit(100000)
input = sys.stdin.readline
mod = 10**9+7
Max = sys.maxsize
def l(): 
    return list(map(int,input().split()))
def m(): 
    return map(int,input().split())
def onem(): 
    return int(input())
def s(x): 
    a = []
    aa = x[0]
    su = 1
    for i in range(len(x)-1):
        if aa != x[i+1]:
            a.append([aa,su])
            aa = x[i+1]
            su = 1
        else:
            su += 1
    a.append([aa,su])
    return a
def jo(x): 
    return " ".join(map(str,x))
def max2(x): 
    return max(map(max,x))
def In(x,a): 
    k = bs.bisect_left(a,x)
    if k != len(a) and a[k] ==  x:
        return True
    else:
        return False
"""
def nibu(x,n,r):
    ll = 0
    rr = r
    while True:
        mid = (ll+rr)//2

    if rr == mid:
        return ll
    if (ここに評価入れる):
        rr = mid
    else:
        ll = mid+1
"""

n = input().split()[0]

a = n.count("A")

b = n.count("B")

if a == 3 or b == 3:
    print("No")
else:
    print("Yes")

Solution (Python):
s=input()
if s.count('A')>0 and s.count('B')>0:
  print('Yes')
else:
  print('No')

Solution (Python):
S = input()
if S not in ("AAA","BBB"):
    print("Yes")
else:print("No")

Solution (Python):
def main():
    s = list(input())
    if len(set(s)) == 2:
        print('Yes')
    else:
        print('No')
if __name__=='__main__':
    main()

Solution (Python):
S = input()

if S == 'AAA' or S == 'BBB':
    print('No')
else:
    print('Yes')

Solution (Python):
s = input()
if s == 'AAA' or s == 'BBB':
  print('No')
else:
  print('Yes')

Solution (Python):
import sys
int1 = lambda x: int(x) - 1
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(500000)

S = read().decode().rstrip()

if S[0] == S[1] == S[2]:
    print("No")
else:
    print("Yes")

Solution (Python):
s = input()
if s == "AAA" or s == "BBB":
    print("No")
else:
    print("Yes")

Solution (Python):
S = input()
if S.count('A') == 3 or S.count('B') == 3:
    print('No')
else:
    print('Yes')

Solution (Python):
s = input()
if len(set(list(s))) == 1:
    print('No')
else:
    print('Yes')

Solution (Python):
s = input()

if s == "AAA" or s == "BBB":
  print("No")
else:
  print("Yes")

Solution (Python):
S = input()
if S in ('AAA', 'BBB'):
    print("No")
else:
    print("Yes")

Solution (Python):

import sys

YES = "Yes"  
NO = "No"  


def solve(S: str):
    print(YES if 'A' in S and 'B' in S else NO)
    return



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    S = next(tokens)  
    solve(S)

if __name__ == '__main__':
    main()

Solution (Python):
N = input()



if N[0]==N[1]==N[2]:
    print('No')
    exit()
print('Yes')

Solution (Python):
S = input()
bad = ['AAA', 'BBB']
if S in bad:
    print('No')
else:
    print('Yes')

Solution (Python):
from sys import stdin
import math
def input():
	return stdin.readline()[:-1]

def intput():
	return int(input().rstrip())

def sinput():
	return input().rstrip().split()

def intsput():
	return map(int, sinput())

def main():
	str = input()
	if str == "AAA" or str == "BBB":
		print("No")
	else:
		print("Yes")


if __name__ == '__main__':
	main()

Solution (Python):
def main():
    
    
    
    
    
    
    
    
    
    
    
    
    
    s =list(input())
    if s[0] == s[1] == s[2]:
        print("No")
    else:
        print("Yes")

if __name__ == '__main__':
    main()

Solution (Python):
s = input()
if s.count("A") == 0 or s.count("B") == 0:
    print("No")
else:
    print("Yes")

Solution (Python):
S = input()
print('No' if S in ('AAA', 'BBB') else 'Yes')

Solution (Python):
S = input()
if 'A' in S and 'B' in S:
    print('Yes')
else:
    print('No')

Solution (Python):
S = input()
if S in ['AAA', 'BBB']:
    print('No')
else:
    print('Yes')

Solution (Python):
s = list(input())

if "A" in s and "B" in s:
  print("Yes")
else:
  print("No")

Solution (Python):
"""
// Author : snape_here - Susanta Mukherjee
     
"""
 
from __future__ import division, print_function
 
import os,sys
from io import BytesIO, IOBase
 
if sys.version_info[0] < 3:
    from __builtin__ import xrange as range
    from future_builtins import ascii, filter, hex, map, oct, zip
 
 
def ii(): return int(input())
def si(): return input()
def mi(): return map(int,input().split())
def li(): return list(mi())
 
 
def gcd(x, y):
    while y:
        x, y = y, x % y
    return x
    
 
def read():
    sys.stdin = open('input.txt', 'r')  
    sys.stdout = open('output.txt', 'w') 
 
 
import math

mod=1000000007 

def main():

    s=si()
    if s.count('A') and s.count('B'):
        print("Yes")
    else:
        print("No")


 
BUFSIZE = 8192
 
 
class FastIO(IOBase):
    newlines = 0
 
    def __init__(self, file):
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None
 
    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()
 
    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()
 
    def flush(self):
        if self.writable:
            os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0)
 
 
class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode("ascii"))
        self.read = lambda: self.buffer.read().decode("ascii")
        self.readline = lambda: self.buffer.readline().decode("ascii")
 
 
def print(*args, **kwargs):
    """Prints the values to a stream, or to sys.stdout by default."""
    sep, file = kwargs.pop("sep", " "), kwargs.pop("file", sys.stdout)
    at_start = True
    for x in args:
        if not at_start:
            file.write(sep)
        file.write(str(x))
        at_start = False
    file.write(kwargs.pop("end", "\n"))
    if kwargs.pop("flush", False):
        file.flush()
 
 
if sys.version_info[0] < 3:
    sys.stdin, sys.stdout = FastIO(sys.stdin), FastIO(sys.stdout)
else:
    sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)
 
input = lambda: sys.stdin.readline().rstrip("\r\n")
 

 
 
if __name__ == "__main__":
    
    main()

Solution (Python):
print("No" if len(set(list(input())))==1 else"Yes")

Solution (Python):
import sys, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd
 
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def S_MAP(): return map(str, input().split())
def LIST(): return list(map(int, input().split()))
def S_LIST(): return list(map(str, input().split()))
 
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

s = input()

if s[0] == s[1] == s[2]:
    print("No")
else:
    print("Yes")

Solution (Python):
S = input()
if S == "AAA" or S == "BBB":
    print("No")
else:
    print("Yes")

Solution (Python):
s=input()
if len(set((list(s))))==2:
    print("Yes")
else:
    print("No")

Solution (Python):

import re
import math
import itertools
from copy import deepcopy
import fractions
import random
from functools import lru_cache
from heapq import heappop,heappush
import time
import sys
readline = sys.stdin.readline
sys.setrecursionlimit(2000)

alphabet="abcdefghijklmnopqrstuvwxyz"
mod=int(10**9+7)
inf=int(10**20)
def yn(b):
    if b:
        print("yes")
    else:
        print("no")
def Yn(b):
    if b:
        print("Yes")
    else:
        print("No")
def YN(b):
    if b:
        print("YES")
    else:
        print("NO")
class union_find():
    def __init__(self,n):
        self.n=n
        self.P=[a for a in range(N)]
        self.rank=[0]*n
 
    def find(self,x):
        if(x!=self.P[x]):self.P[x]=self.find(self.P[x])
        return self.P[x]
 
    def same(self,x,y):
        return self.find(x)==self.find(y)
 
    def link(self,x,y):
        if self.rank[x]<self.rank[y]:
            self.P[x]=y
        elif self.rank[y]<self.rank[x]:
            self.P[y]=x
        else:
            self.P[x]=y
            self.rank[y]+=1
 
    def unite(self,x,y):
        self.link(self.find(x),self.find(y))
 
    def size(self):
        S=set()
        for a in range(self.n):
            S.add(self.find(a))
        return len(S)
def bin_(num,size):
    A=[0]*size
    for a in range(size):
        if (num>>(size-a-1))&1==1:
            A[a]=1
        else:
            A[a]=0
    return A
def fac_list(n,mod_=0):
    A=[1]*(n+1)
    for a in range(2,len(A)):
        A[a]=A[a-1]*a
        if(mod>0):A[a]%=mod_
    return A
def comb(n,r,mod,fac):
    if(n-r<0):return 0
    return (fac[n]*pow(fac[n-r],mod-2,mod)*pow(fac[r],mod-2,mod))%mod
def next_comb(num,size):
    x=num&(-num)
    y=num+x
    z=num&(~y)
    z//=x
    z=z>>1
    num=(y|z)
    if(num>=(1<<size)):return False
    else:
        return num
def get_primes(n,type="int"):
    A=[True]*(n+1)
    A[0]=False
    A[1]=False
    for a in range(2,n+1):
        if A[a]:
            for b in range(a*2,n+1,a):
                A[b]=False
    if(type=="bool"):return A
    B=[]
    for a in range(n+1):
        if(A[a]):B.append(a)
    return B
def is_prime(num):
    if(num<=2):return False
    i=2
    while i*i<=num:
       if(num%i==0):return False
       i+=1
    return True
def join(A,c=" "):
    n=len(A)
    A=list(map(str,A))
    s=""
    for a in range(n):
        s+=A[a]
        if(a<n-1):s+=c
    return s


s=input()
Yn(len(set(s))!=1)

Solution (Python):
s = input()
print('No' if s == 'AAA' or s == 'BBB' else 'Yes')