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):
s=input()
a=s.count('A')
print
b=s.count('B')
if a>0 and b>0:
	print("Yes")
else:
	print("No")

Solution (Python):
x = input()
a = False

if x == 'AAA':
    a = True
elif x == 'BBB':
    a = True

if a == True:
    print('No')
else :
    print('Yes')

Solution (Python):
from collections import *
from itertools import *
from bisect import *
from heapq import *
import copy
import math
from fractions import gcd

mod=10**9+7

S=input()

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

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

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

Solution (Python):
s = input()
s1 = s[:1]
s2 = s[1:2]
s3 = s[2:]

if s1 == s2 and s2 == s3:
  print('No')
else:
  print('Yes')

Solution (Python):
S=input()

a=S[0]
b=S[1]
c=S[2]

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

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

Solution (Python):
S = input()

if len(S)==3 and S.count('A')==2 or S.count('B')==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 len(set(s)) ==1:
    print("No")
else :
    print("Yes")

Solution (Python):
s = input()

s = dict.fromkeys(list(s))

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

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

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

Solution (Python):
import re
ptr=["A{3}|B{3}"]
str=input()

for valueptr in ptr:
    pattern=re.compile(valueptr)
    res=pattern.search(str)
    if res is None:
        print("Yes")
    else:
        print("No")

Solution (Python):
S = input()

list_s = set(list(S))

if len(list_s) == 1:
    print("No")
else:
    print("Yes")

Solution (Python):
a = input()

if a == 'BBB':
    print('No')
elif a == 'AAA':
    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':
    print('No')
elif s == 'BBB':
    print('No')
else:
    print('Yes')

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

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

Solution (Python):



s = input()

resultA = s.find("AAA")
resultB = s.find("BBB")

if resultA == 0:
    print("No")
elif resultB == 0:
    print("No")
else:
    print("Yes")

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

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

Solution (Python):


s = input()

if ('A' in s and 'B' in s) == True:
  print('Yes')
else:
  print('No')

Solution (Python):
S = input()
bus = ["ABA", "AAB", "BAA", "BAB", "ABB", "BBA"]
if S in bus:
  print('Yes')
else:
  print('No')

Solution (Python):
import numpy as np

bus = input()

if bus == "AAA":
    print("No")
elif bus == "BBB":
    print("No")
else:
    print("Yes")

Solution (Python):
text = str(input())
if text == "AAA" or text == "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()
a=False
b=False
for i in range(len(s)):
    if s[i]=='A':
        a=True
    if s[i]=='B':
        b=True
if a and b:
    print('Yes')
else:
    print('No')

Solution (Python):



from fractions import gcd 
from functools import reduce
import sys
sys.setrecursionlimit(200000000)
from inspect import currentframe




def printargs2err(*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),file=sys.stderr)
def debug(*args):
    print(*args,file=sys.stderr)

def printglobals():
    for (symbol, value) in globals().items():
        print('symbol="%s"、value=%s' % (symbol, value),file=sys.stderr)
def printlocals():
    for (symbol, value) in locals().items():
        print('symbol="%s"、value=%s' % (symbol, value),file=sys.stderr)

def pin(type=int):
    return map(type,input().split())
     


def resolve2():
    N,A,B=pin()
    ans=0
    cycle=A+B
    ans+=A*(N//cycle)
    t=N%cycle
    if t <= A:
        ans+=t
    else:
        ans+=A
    print(ans)
def resolve():
    N=input()
    cond= N=="AAA" or N=="BBB"
    print(["No","Yes"][1-cond])
    
    
    


"""


"""
"""
お前カッコ閉じるの忘れてるだろ
"""
import sys
from io import StringIO
import unittest

class TestClass(unittest.TestCase):
    def assertIO(self, input, output):
        stdout, stdin = sys.stdout, sys.stdin
        sys.stdout, sys.stdin = StringIO(), StringIO(input)
        resolve()
        sys.stdout.seek(0)
        out = sys.stdout.read()[:-1]
        sys.stdout, sys.stdin = stdout, stdin
        self.assertEqual(out, output)
    def test_入力例_1(self):
        input = """ABA"""
        output = """Yes"""
        self.assertIO(input, output)
    def test_入力例_2(self):
        input = """BBA"""
        output = """Yes"""
        self.assertIO(input, output)
    def test_入力例_3(self):
        input = """BBB"""
        output = """No"""
        self.assertIO(input, output)

if __name__=="__main__":resolve()

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

print("Yes" if 1 <= S.count("A") <= 2 else "No")

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

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

Solution (Python):

i_str = input()
stations = list(i_str)

flagA = False
flagB = False

for ss in stations:
    
    if ss == 'A':
        flagA = True
    elif ss == 'B':
        flagB=True

if flagA == True and flagB == True:
    print('Yes')
else:
    print('No')

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

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

Solution (Python):
s = input()

s = dict.fromkeys(list(s))

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

Solution (Python):
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 = str(input())

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

Solution (Python):
S = input()

ans = "Yes"
if S[0] == S[1] == S[2] :
    ans = "No"
else :
    ans = "Yes"

print(ans)

Solution (Python):
s=list(input())
if s == ['A','A','A'] or s == ['B','B','B']:
  print('No')
else:
  print('Yes')

Solution (Python):
s = str(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=list(input())
if all(s=="B" for s in S):
  print("No")
elif all(s=="A" for s in S):
  print("No")
else:
  print("Yes")

Solution (Python):
S=input()
s=S[0]
for i in range(1,3):
    if s!=S[i]:
        print("Yes")
        break
else:
    print("No")

Solution (Python):
s=list(input().split())
ans="Yes"
if s==["AAA"]:
  ans="No"
if s==["BBB"]:
  ans="No"
print(ans)

Solution (Python):
S = input()

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

Solution (Python):

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

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

Solution (Python):
a = list(input())
if a[0] == a[1] and a[1] == a[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 '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 = list(input())
if s.count("A") == 3:
  print("No")
elif s.count("B") == 3:
  print("No")
else:
  print("Yes")

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

Solution (Python):
S = input()
a = 0
b = 0
for s in S:
    if s == "A":
        a += 1
    elif s == "B":
        b += 1
if a == 0 or b == 0:
    print("No")
else:
    print("Yes")

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

Solution (Python):
S = list(input().strip())
S_set=set(S)

print("Yes" if len(S_set)==2 else "No")

Solution (Python):
S = input()

cb=ca=0
for i in S:
    if (i=='A'):
        ca+=1

    elif (i=='B'):
        cb+=1
if(ca==3 or cb==3):
    print('No')
else:
    print('Yes')

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

Solution (Python):
S = input()

flag_a = 0
flag_b = 0
for i in range(3):
  if S[i] == "A":
    flag_a += 1
  else:
    flag_b += 1
if flag_a and flag_b:
  print("Yes")
else:
  print("No")

Solution (Python):
s = list(input())
ans = 'No'
first_station = s[0]
for c in s:
    if first_station != c:
        ans = 'Yes'

print(ans)

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

Solution (Python):
s = input()
ans = 'Yes'

if s == "AAA" or s == "BBB":
  ans = "No"

print(ans)

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

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

Solution (Python):
raw_input = input()
l = list(raw_input)

if l[0] == l[1]:
    if l[1] == l[2]:
        print("No")
    else:
        print("Yes")
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):
a = str(input())
if (a == "AAA") or (a =="BBB"):
  print("No")
else:
  print("Yes")

Solution (Python):
l = input()

if l == 'AAA':
    print('No')
elif l == 'BBB':
    print('No')
else:
    print('Yes')

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

Solution (Python):
S = input()

cnt_A = 0
cnt_B = 0

for l in S:
    if l == 'A':
        cnt_A += 1
    else :
        cnt_B += 1

if cnt_A and cnt_B:
    print('Yes')
else :
    print('No')

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

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

def gcd(a: int, b: int):
    """ https://cocodrips.hateblo.jp/entry/2014/03/05/143623
    """
    while b:
        a, b = b, a%b
    return a

def lcm(a: int, b: int):
    return a * b // gcd(a, b)


def main():
	
	S = input().rstrip()
	
	
	
	res = "No" if (S=="AAA" or S=="BBB") else "Yes"
	
	
	print(res)
	
if __name__ == "__main__":
    main()

Solution (Python):

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

Solution (Python):

import sys
read = sys.stdin.readline


def read_ints():
    return list(map(int, read().split()))


def read_a_int():
    return int(read())


def read_tuple(H):
    '''
    H is number of rows
    '''
    ret = []
    for _ in range(H):
        ret.append(tuple(map(int, read().split())))
    return ret


def read_col(H, n_cols):
    '''
    H is number of rows
    n_cols is number of cols

    A列、B列が与えられるようなとき
    '''
    ret = [[] for _ in range(n_cols)]
    for _ in range(H):
        tmp = list(map(int, read().split()))
        for col in range(n_cols):
            ret[col].append(tmp[col])

    return ret


def read_matrix(H):
    '''
    H is number of rows
    '''
    return [list(map(int, read().split())) for _ in range(H)]


def read_map(H):
    '''
    H is number of rows
    文字列で与えられた盤面を読み取る用
    '''
    return [read()[:-1] for _ in range(H)]


def read_map_as_int(H):
    '''
    
    '''
    ret = []
    for _ in range(H):
        ret.append([1 if s == '
    return ret


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

Solution (Python):

s = input()

if s[0] == 'A' and s[1] == 'A' and s[2] == 'A':
    print('No')
elif s[0] == 'B' and s[1] == 'B' and s[2] == 'B':
    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]==S[2]:
    print('No')
else:
    print('Yes')

Solution (Python):
S = input()

s_len = len(S)

if S.count('A') == s_len:
    print('No')
    exit()
if S.count('B') == s_len:
    print('No')
    exit()

print('Yes')

Solution (Python):
a = input()

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

Solution (Python):
s=str(input())
if s=="AAA":
    print("No")
elif s=="BBB":
    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):
S= input()
if 'A' in S and 'B' in S:
  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_list = list(input())

uniq_s_list = set(s_list)

if len(uniq_s_list) > 1:
    print("Yes")
else:
    print('No')

Solution (Python):



def main():
    s = len(set(input()))

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


if __name__ == '__main__':
    main()

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

Solution (Python):
S = input()

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

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

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

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()
s_unique = ''.join(set(s))



if len(s_unique) == 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()
print('Yes') if 'A' in S and 'B' in S else print('No')

Solution (Python):
printn = lambda x: print(x,end='')
inn = lambda : int(input())
inl   = lambda: list(map(int, input().split()))
inm   = lambda:      map(int, input().split())
ins = lambda : input().strip()
DBG = True 
BIG = 10**18
R = 10**9 + 7

def ddprint(x):
  if DBG:
    print(x)

s = ins()
hasa = (s[0]=='A') or (s[1]=='A') or (s[2]=='A')
hasb = (s[0]=='B') or (s[1]=='B') or (s[2]=='B')
if hasa and hasb:
    print('Yes')
else:
    print('No')

Solution (Python):
S=input()

ans="No"

if S[0] != S[1]:
  ans="Yes"
elif S[0] != S[2]:
  ans="Yes"
elif S[1] != S[2]:
  ans="Yes"
  
print(ans)

Solution (Python):

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

Solution (Python):
inputstring = input()
count = 0
if len(inputstring) == 3:
  for i in inputstring:
    if i == 'A':
      count = count + 0
    else:
      count = count + 1
  if count == 0 or count == 3:
    print("No")
  else:
    print("Yes")
else:
  print()

Solution (Python):
s = input()

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

Solution (Python):

s = input()
ans = ''

if s == 'AAA' : 
    ans = 'No'
elif s == 'BBB' :
 ans = 'No'
else :
    ans = 'Yes'

print(ans)

Solution (Python):


S = str(input())
Ans = 'Yes'

if S == 'AAA' or S == 'BBB':
    Ans = 'No'

print(Ans)

Solution (Python):
import sys
sys.setrecursionlimit(10**6)
readline = sys.stdin.readline
read = sys.stdin.read



if len(set(i for i in input()))==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()
if s=="AAA" or s=="BBB":
	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):
from sys import stdin

s = stdin.readline().rstrip()

result = "No"

if 'A' in s:
    if 'B' in s:
        result = "Yes"

print(result)

Solution (Python):
s = list(input())
print("No" if all([e == 'A' for e in s]) or all([e == 'B' for e in s]) else "Yes")

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

Solution (Python):
from sys import stdin, stdout
import math
from itertools import permutations, combinations
from collections import defaultdict
import bisect
import heapq as hq

def main():
    try:
        s=list(input())
        s=list(set(s))
        if len(s)==1:
          print('No')
        else:
          print('Yes')
       
    except:
        pass
def add(a, b, c):
    res = a + b;
    if (res >= c):return res - c;
    else:return res;
def mod(a, b, c):
    res = a * b
    if (res >= c):return res % c
    else:return res
def gcd(a, b):
    while b:
        a, b = b, a % b
    return a
def lcm(a, b):
    w = a // gcd(a, b)
    return w * b
def expo(a, b):
    x, y = 1, a
    while (b > 0):
        if (b & 1):
            x = x * y
        y = y * y
        b >>= 1
    return x
def power(a, b, m):
    x, y = 1,
    while (b > 0):
        if (b & 1):x = mod(x, y, m)
        y = mod(y, y, m)
        b >>= 1
    return x
def L():
    return list(map(int, stdin.readline().split()))
def In():
    return map(int, stdin.readline().split())
def I():
    return int(stdin.readline())
P = 1000000007


if __name__ == '__main__':
    main()

Solution (Python):

n = list(input())

if n[0]=="A":
    if n[1]=="B":
        print("Yes")
    else:
        if n[2]=="B":
            print("Yes")
        else:
            print("No")
else:
    if n[1]=="A":
        print("Yes")
    else:
        if n[2]=="A":
            print("Yes")
        else:
            print("No")

Solution (Python):
n = list(input())
s = 'S'
ans = 'No'
for i in range(3):
  s = n[i]
  if i <= 1:
    if s != n[i+1]:
      ans = 'Yes'
print(ans)

Solution (Python):
s = input()

a = [0, 0]
for si in s:
    if si == 'A':
        a[0] = 1
    else:
        a[1] = 1

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

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):
s = list(input())
ans = "Yes"
if len(set(s)) == 1:
  ans = "No" 
print(ans)

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

Solution (Python):


S=str(input())

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

Solution (Python):
import sys

s = sys.stdin.readline().strip()

first = s[0]

same = True
for letter in s:
    if letter != first:
        same = False

if same:
    print('No')
else:
    print('Yes')

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

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

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

Solution (Python):
station = input()

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

Solution (Python):
def calculate(s):
    if s == "AAA":
        print("No")
    elif s == "BBB":
        print("No")
    else:
        print("Yes")

S = input()
calculate(S)

Solution (Python):
s = input()
flag = 0

for i in range(3):
    for j in range(3):
        if s[i] != s[j]:
            flag =1

if flag ==1 :
    print("Yes")
else:
    print("No")

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

Solution (Python):
S = str(input())
if S == "AAA":
  ans = 'No'
elif S == "BBB":
  ans = 'No'
else:
  ans = 'Yes'
print(ans)

Solution (Python):
x = input()
for i in [0,1,2]:
    j = (i+1)%3
    if not x[i] == x[j]:
        print('Yes')
        exit()
print('No')

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

Solution (Python):
S = input()
A = 0
B = 0

for s in S:
    if s == "A":
        A += 1
    else:
        B += 1
if A == 0 or B == 0:
    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):
a=input()
if a=="AAA" or a=="BBB":
    print("No")
else:
    print("Yes")

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

Solution (Python):


s = raw_input()
print ['No', 'Yes'][len(set(s)) > 1]

Solution (Python):
str = list(input())
A = str[0]
B = str[1]
C = str[2]

ans = "No"
if A != B:
    ans = "Yes"
elif A != C:
    ans = "Yes"
elif B != C:
    ans = "Yes"


print(ans)

Solution (Python):
a = input()
al = []
for i in a:
    al.append(i)
if al[0]==al[1]==al[2]:
    print('No')
else:
    print('Yes')

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

Solution (Python):
a = input()

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

Solution (Python):

import sys




x = input()
ans = "Yes"

if x == "AAA" or x == "BBB" :
    ans = "No"

print(ans)

Solution (Python):
S = [i for i in 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):
N = input()
if N.count("A") == 3:
    print("No")
elif N.count('B') == 3:
    print("No")
else :
    print("Yes")

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

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

Solution (Python):
a = list(input())
if a[0] == a[1] == a[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):

a,  b, c = input()
if a == b and b == c:
    print('No')
else:
    print('Yes')

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

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

Solution (Python):

s = input()

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

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

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



if S[0] == 'A':
    if S[1] == 'B' or S[2] == 'B':
        print 'Yes'
    else:
        print 'No'
else:
    if S[1] == 'A' or S[2] == 'A':
        print 'Yes'
    else:
        print 'No'

Solution (Python):


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

def main():
    mod=10**9+7
    S=input()
    if S=="AAA" or S=="BBB":
        print("No")
    else:
        print("Yes")

main()

Solution (Python):
s = input()
if s in ["AAA" ,"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.count('A') == len(S) or S.count('A') == 0:
    print('No')
else:
    print('Yes')

Solution (Python):
a = input()
b = a[0] + a[1]
c = a[0] + a[2]
d = a[1] + a[2]
if b == "AB" or b == "BA":
    print("Yes")
elif c == "AB" or c == "BA":
    print("Yes")
elif d == "AB" or d == "BA":
    print("Yes")
else:
    print("No")

Solution (Python):
mogi = input()

first = mogi[0]
use_bus = False

for i in range(len(mogi)):
  if first != mogi[i]:
    use_bus = True
    break

if use_bus:
  print("Yes")
else:
  print("No")

Solution (Python):
S =str(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 s[0] == s[1] and s[0] == s[2]:
  print('No')
else:
  print('Yes')

Solution (Python):
S = input()
print("No" if S in ["A"*3,"B"*3] else "Yes")

Solution (Python):
S = input()

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

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

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

if s == 'AAA' or s == 'BBB':
    print('No')
else:
    print('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()
print('Yes' if 'A' in s and 'B' in s else 'No' )

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

Solution (Python):
N = input()
if N =="AAA":
  print("No")
elif N == "BBB":
  print("No")
else:
  print("Yes")

Solution (Python):
S = input()

a = S[0]
b = S[1]
c = S[2]

if a==b and b==c and c==a:
  print('No')
else:
  print('Yes')

Solution (Python):
station = list(input())
for i in range(2):
    if station[i] != station[i+1]:
        print("Yes")
        break
else:
    print("No")

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

if s in ['AAA', 'BBB']:
    print('No')
else:
    print('Yes')

Solution (Python):
a = input()
b = list(a)
if b[0]=='A' and b[1]=='A' and b[2]=='A':
    print('No')
elif b[0]=='B' and b[1]=='B' and b[2]=='B':
    print('No')
else:
    print('Yes')

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

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

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

Solution (Python):
s = str(input())
if s.find('A') > -1 and s.find('B') > -1:
    print('Yes')
else:
    print('No')

Solution (Python):
S = input()

if S == "AAA" or S == "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):
S = input()

if S in ("AAA", "BBB"):
    print("No")
else:
    print("Yes")

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

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

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

Solution (Python):
S=input()
lens = len(S)
s = [S[i] for i in range(lens)]
a = ['A' for i in range(lens) if S[i]=='A']
b = ['B' for i in range(lens) if S[i]=='B']
if len(a)>0 and len(b)>0:
    print('Yes')
else:
    print('No')

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

Solution (Python):
s = str(input())
tmp = s[0]

for c in s:
    if tmp != c:
        print("Yes")
        exit()
else:
    print("No")

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

Solution (Python):
s = input()

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

Solution (Python):
a = input()
b = list(a)
hantei = "Yes"
if b[0] == b[1] and b[1] == b[2] and b[2] == b[0]:
  hantei = "No"
print(hantei)

Solution (Python):
from sys import stdin

def main():

    input = stdin.readline

    S = input()[:-1]


    if((S in 'AAA') or (S in 'BBB')):
        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 = str(input())
if s == "AAA" or s == "BBB":
    print("No")
else:
    print("Yes")

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

Solution (Python):

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

Solution (Python):
s = input()

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

Solution (Python):
S = input()

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

Solution (Python):
s = input().rstrip()

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

Solution (Python):
s = input()
if len(set(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=='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()

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

Solution (Python):

def main():

    s = input()

    result = "Yes"

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

if __name__ == '__main__':
    main()

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

Solution (Python):



def ri():
    return int(input())

def rl():
    return list(input().split())

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

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


if __name__ == '__main__':
    main()

Solution (Python):









import os


def main():
    S = input()
    if 'A' in S and 'B' in S:
        print("Yes")
    else:
        print("No")

if __name__ == "__main__":
    main()

Solution (Python):
S = input()

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

Solution (Python):
S=input();
x=("AB" in S)+("BA" in S)
print("Yes" if x>0 else "No")

Solution (Python):
s = {c for c in input()}

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

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

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

Solution (Python):
S = input()
s = S[0]
flag = 0
for i in range(1, 3):
    if s != S[i]:
        flag = 1

if flag == 1:
    print('Yes')
else :
    print('No')

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

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