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

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

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

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

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

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

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

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

Solution (Python):
Line = set(list(input()))

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

Solution (Python):


s=set(input())
print("Yes") if len(s)==2 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 = set(list(input()))
print("Yes" if len(S) != 1 else "No")

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

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

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

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

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

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

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

Solution (Python):

S = (input())


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())
if s[0] == s[1] == s[2]:
  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=set(input())
n=len(S)
print("Yes" if n>1 else "No")

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=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 == 'AAA' or s == 'BBB' else 'Yes')

Solution (Python):
s=input()
li=[s[0],s[1],s[2]]
if li.count("A")==1 or li.count("A")==2:
    print("Yes")
else:
    print("No")

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

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

Solution (Python):
s=input()
print('Yes' if len(set(s))!=1 else '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_right as br
from bisect import bisect_left as bl
sys.setrecursionlimit(2147483647)
from heapq import heappush, heappop,heappushpop
from collections import defaultdict
from itertools import accumulate
from collections import Counter
from collections import deque
from operator import itemgetter
from itertools import permutations
mod = 10**9 + 7
inf = float('inf')
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))

s = input()
n = len(s)
c = s.count('A')
if c == 0 or c == n:
    print('No')
else:
    print('Yes')

Solution (Python):
s=input()
for i in range(len(s)-1):
    if s[i]!=s[i+1]:
        print("Yes")
        exit()

print("No")

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

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

Solution (Python):
N = input()
if len(set(N))==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.count('A')==0 or s.count('B')==0):
  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 S.count('A')>0 and S.count('B')>0 else print('No')

Solution (Python):
def main():
    s = input()

    for i in range(1,len(s)):
        if s[i-1] != s[i]:
            print('Yes')
            exit()

    print('No')
    
if __name__ == '__main__':
    main()

Solution (Python):
print("YNeos"[len(set(input()))%2::2])

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

Solution (Python):
def main():
    S = input()

    cnt_A = 0
    cnt_B = 0

    for i in range(len(S)):
        if S[i] == "A":
            cnt_A += 1
        else:
            cnt_B += 1

    if cnt_A == 3 or cnt_B == 3:
        print('{}'.format('No'))
    else:
        print('{}'.format('Yes'))


if __name__ == '__main__':
    main()

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

def main():
    s = input().strip()
    if s in ["AAA", "BBB"]:
        print("No")
    else:
        print("Yes")


if __name__ == "__main__":
    main()

Solution (Python):
S = input()
L = []
for k in S:
    L.append(k)
newL = set(L)
if len(newL) == 1:
    print('No')
else:
    print('Yes')

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

Solution (Python):
print('YNeos'[input() in ('AAA','BBB')::2])

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

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

Solution (Python):
import sys
input = sys.stdin.readline
s = input().strip()
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):
n =[i for i in input()]

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

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

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

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

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

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

Solution (Python):
print('Yes' if len(set(list(input().strip())))-1 else 'No')

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

Solution (Python):




s = input()

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

Solution (Python):
word = input()

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

Solution (Python):
a=input()
if 'A' in a and 'B' in a: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 = raw_input()
if s[0] == s[1] and s[1] == s[2]:
  print "No"
else:
  print "Yes"

Solution (Python):
Flag =  0 
S = input()
SA = [str(c) for c in S]


S1 = SA[0]
S2 = SA[1]
S3 = SA[2]
if(S1 == S2 == S3):
    print("No")
else:
    print("Yes")

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

Solution (Python):
S = input()

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

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

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):
a = input()
if a[0] == a[1] == a[2]:
  print('No')
else:
  print('Yes')

Solution (Python):
def InS(): return input()


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


def InI(): return int(input())


S = input()

S_list = list(S)


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

Solution (Python):


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

Solution (Python):
s = input()

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

Solution (Python):
g=input()
f = list(g)
h =set(f)
k = list(h)
if len(h)==1:
  print('No')
else :  
  print('Yes')

Solution (Python):
value = input()

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

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 == str("AAA"):
    print("No")
elif S == str("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 "AB" in s or "BA" 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[0] == s[1] and s[1] == s[2] else 'Yes')

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[0]==S[1] and S[1]==S[2]):
	print("No")
else:
	print("Yes")

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 S=='AAA' or S=='BBB':
  print('No')
else:
  print('Yes')

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

Solution (Python):
n=input()
if n=='AAA' or n=='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 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(S)==3 and S.count('A')==2 or S.count('B')==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 len(S)==3 and S.count('A')==2 or S.count('B')==2:
    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 = [str(i) for i in s]

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

Solution (Python):
a,b,c=input()
if a==b==c:
    print("No")
else:
    print("Yes")

Solution (Python):

a = input()

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

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

Solution (Python):
a, b, c = list(input())


if a == b == c:
    ans = 'No'
else:
    ans = 'Yes'

print(ans)

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

flag = 1

if S[0] == S[1] and S[1] == S[2]:
    flag = 0

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

Solution (Python):
s=input()
l=list(s)
if l.count('A')==3 or l.count('B')==3:
  	print("No")
else:
	print("Yes")

Solution (Python):
s=input()
if 'AB' in s or 'BA' 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):
st1, st2, st3 = input()
ans = "Yes"

if st1 == st2 == st3 :
    ans = "No"

print(ans)

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

Solution (Python):


s=list(input())
cnt = 0
for i in s:
    for j in s:
        if i != j:
            cnt +=1

if cnt == 0:
    print('No')
else:
    print('Yes')

Solution (Python):
S = input()
a = S.count("A")

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

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

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

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

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

firstStation = tList[0]
Monopoly = 0

for str in tList:
    if(str == firstStation):
        Monopoly = 0

    else:
        Monopoly = 1
        break

if(Monopoly == 0):
    print('No')
else:
    print('Yes')

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):
print("Yes" if len(set(input())) == 2 else "No")

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

Solution (Python):
print("YNeos"[2-len(set(input()))::2])

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()
ret = "Yes"
if s == "AAA" or s == "BBB":
    ret = "No"
print("{}".format(ret))

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

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

Solution (Python):
from sys import stdin

S = stdin.readline().strip()

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

Solution (Python):
S = input()
a = []
for i in range(0, 3):
    a.append(S[i])

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

Solution (Python):
s = input()

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

Solution (Python):
S = set(list(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]:
    print("No")
else:
    print("Yes")

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

Solution (Python):
_string = input()

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

Solution (Python):
sta = input()

s1 = sta[0]
s2 = sta[1]
s3 = sta[2]

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

Solution (Python):
s=input().strip()
s=sorted(s)
if s[0]==s[2]:
    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 == 'AAA' or S == 'BBB':
	print('No')
else:
	print('Yes')

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):
n = input()
if n == "AAA" or n == "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 = list(input())
if S[0] == S[1] and S[0] == 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 = [x for x in input()]
if 'A' in S and 'B' in S:
    print("Yes")
else:
    print("No")

Solution (Python):
import sys
from math import *
from collections import deque, Counter, defaultdict
from fractions import gcd
input = lambda: sys.stdin.readline().rstrip()

def eprint(s):
    sys.stderr.write('DEBUG: {}'.format(s))
    return

def main():
    ans="Yes"
    S = input()
    if(S=='AAA' or S=='BBB'):
      ans="No"
    print(ans)
    return

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):
bus = input()
if not( 'A' in bus):
  print( 'No')
elif not( 'B' in bus):
  print( 'No' )
else:
  print( 'Yes' )

Solution (Python):
s = input()
if len(set(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(s=="AAA" or s=="BBB"):
  print("No")
else:
  print("Yes")

Solution (Python):
S = input()
cnt = 0
for i in range(3):
  if S[i] == 'A':
    cnt = cnt +1
 
if cnt == 3 or cnt == 0:
  print('No')
else:
  print('Yes')

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

Solution (Python):
input_line=set(input())

if len(input_line) == 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,os
from collections import defaultdict, deque
from fractions import gcd
from math import ceil, floor
sys.setrecursionlimit(10**6)
write = sys.stdout.write
dbg = (lambda *something: print(*something)) if 'TERM_PROGRAM' in os.environ else lambda *x: 0
def main(given=sys.stdin.readline):
    input = lambda: given().rstrip()
    LMIIS = lambda: list(map(int,input().split()))
    II = lambda: int(input())
    XLMIIS = lambda x: [LMIIS() for _ in range(x)]
    YN = lambda c : print('Yes') if c else print('No')
    MOD = 10**9+7

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

if __name__ == '__main__':
    main()

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):

 
 
def main():
 
    in_ = input()
 
    if (in_ == 'AAA' or
        in_ == 'BBB'):
        print('No')
    else:
        print('Yes')
 
    return 0
 
 
if __name__ == '__main__':
    main()

Solution (Python):
N = input()

if "BBB" == N or "AAA"==N:
  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 == '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 set(list(S)).__len__()==1:
    print("No")
else:
    print("Yes")

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

Solution (Python):
N = input()

if len(N)==3 and N.count('A')==2 or N.count('B')==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()
a = 'AAA'
b = 'BBB'
if a in s or b in s:
    print("No")
    exit()
print("Yes")

Solution (Python):
import sys
stdin = sys.stdin
sys.setrecursionlimit(10**9)
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
nn = lambda: list(stdin.readline().split())
ns = lambda: stdin.readline().rstrip()

s = ns()
ss = list(s)
a = 'No' if ss[0] == ss[1] and ss[1] == ss[2] else 'Yes'
print(a)

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

else:
  print("Yes")

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

Solution (Python):
data = input()
if data[0] == "A" and data[1] == "A" and data[2] == "A":
    print("No")
elif data[0] == "B" and data[1] == "B" and data[2] == "B":
    print("No")
else:
    print("Yes")

Solution (Python):
x=input()
s=0
for i in range(3):
  s=s+ord(x[i])

if s==195 or s==198:
  print("No")
else:
  print("Yes")

Solution (Python):
x = input()

if x == "AAA":
  print("No")  
elif x == "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 len(set(s))>=2 else "No")

Solution (Python):
S = [x for x in 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 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":
    print("No")
elif s == "BBB":
    print("No")
else:
    print("Yes")

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

Solution (Python):
import sys

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

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

Solution (Python):
S=input()
list=[]
ans=['*', '*', '*']
for s in S:list+="*" if s==S[0] else s

if list==ans :
    print('No')
else :
    print('Yes')

Solution (Python):
a=str(input())
if a=='AAA' or a=='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):
l = list(input())
if 'A'in l and 'B' in l:
    print('Yes')
else:
    print('No')

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

Solution (Python):
s=input()
if len(s)==1:
    print('No')
else:
    if s.count('BA')>=1 or s.count('AB')>=1:
        print('Yes')
    else:
        print('No')

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

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

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


if __name__ == '__main__':
    main()

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

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

Solution (Python):
a = list(input())
a = set(a)

if len(a)==2:
  print('Yes')
else:
  print('No')

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

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

Solution (Python):
from collections import Counter
a=list(input())
d=Counter(a).most_common()
if len(d)==2:
	print("Yes")
else:
	print("No")

Solution (Python):
a=input()
c=0
c=a.count("AB")+a.count("BA")
if c==0:
    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 'A' in s and 'B' in s:
    print('Yes')
else:
    print('No')

Solution (Python):
s = input()
if s.count(s[0]) == 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()

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":
    print("No")
elif s == "BBB":
    print("No")
else:
    print("Yes")

Solution (Python):
s=input()
if(s=="BBB" or s=="AAA"):
    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()
if S[0]==S[1] and S[1]==S[2]:
    print ('No')
else:
    print ('Yes')

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

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

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

Solution (Python):
N = list(input())
if N[0] == N[1] == N[2]:
	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):
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

S = read().rstrip()
print('Yes' if len(set(S)) == 2 else 'No')

Solution (Python):
import sys
from fractions import gcd
from itertools import groupby as gb
from itertools import permutations as perm
from itertools import combinations as comb
from collections import Counter as C
from collections import defaultdict as dd
sys.setrecursionlimit(10**5)
def y(f):
    if f:
        print('Yes')
    else:
        print('No')
def Y(f):
    if f:
        print('YES')
    else:
        print('NO')
def Z(f):
    if f:
        print('Yay!')
    else:
        print(':(')
def ispow(n):
    if int(n**.5)**2==n:
        return True
    return False

y(len(set(list(input())))==2)

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

Solution (Python):
S = input()
before = S[0]
n = 0

for s in S:
    if before == s:
        n += 1

if n == 3:
    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 s == 'AAA':
    print("No")
elif 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 = input()
if "AB" in s or "BA" in s:
    print("Yes")
else:
    print("No")

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

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()

char_list = list(S)


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

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()
n = len(S)
if n == 3:
  a = S.split()
  x = S[0]
  y = S[1]
  z = S[2]
  if x != y or y != z:
    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 == '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 len(set(S)) != 2:
  print("No")
else:
  print("Yes")

Solution (Python):

s = list(input())

count = 0

s = set(s)

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

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

Solution (Python):
S = list(str(input()))
flgA = 0
flgB = 0
for i in range(3):
    if S[i] == 'A':
        flgA = 1
    elif S[i] == 'B':
        flgB =1

if flgA == 1 and flgB ==1:
    print('Yes')
else:
    print('No')

Solution (Python):
n = input()

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

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

Solution (Python):

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

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

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

Solution (Python):
S = input()

v = S[0]

T = "No"

if v != S[1] or v != S[2]:
  T = "Yes"
print(T)

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 len(set(list(s))) == 2:
    print("Yes")
else:
    print("No")

Solution (Python):
S = input()

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

Solution (Python):
S = input()

sl = [s for s in S]

def main():
    cnta = sl.count('A')
    cntb = sl.count('B')
    if cnta in (0,3) or cntb in (0,3):
        return 'No'
    else:
        return 'Yes'

print(main())

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

if list == 'AAA' or list == 'BBB' or len(list) != 3:
    print("No")
else : 
    print("Yes")

Solution (Python):
s = list(input())
if s.count("A") != len(s) and s.count("B") != len(s): print("Yes")
else: print("No")

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