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-----
ABA

-----Sample Output-----
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.

Difficulty: introductory

Starter code:

Solutions:
S = list(map(str,input()))

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

s = input()

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

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


S=input()
print(['Yes','No'][S in ['AAA','BBB']])

Ss = input().rstrip()

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


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

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


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

def main():
    s = input()
    return "Yes" if  len(set(s))==2 else "No"
    
def __starting_point():
    print(main())
__starting_point()

a = input()

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

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

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

s = input()

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

S=input()
if abs(S.count('A')-S.count('B'))!=3:print('Yes')
else:print('No')

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

s = str(input())

if s[0] == 'A':
    t = 'B'
else:
    t = 'A'

answer = s.find(t)

if answer != -1:
    print('Yes')
else:
    print('No')

print("Yes" if len(set(input()))!=1 else "No")

s = input()

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


# coding: utf-8
# Your code her
s = input()

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

s=list(input())
if s[1]=="A" and s[0]=="A" and s[2]=="A":
  print("No")
elif s[1]=="B" and s[0]=="B" and s[2]=="B":
  print("No")

else:
  print("Yes")

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

a = input()

if a == "AAA" or a == "BBB":
    print("No")

else:
    print("Yes")

# 158 A
S = input()
print('No') if S == 'AAA' or S == 'BBB' else print('Yes')

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

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

s=input()
print("Yes" if len(set(s))!=1  else "No")

S = input()

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


S = input()

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

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


S = str(input())
if S == 'AAA' or S== 'BBB':
  print('No')

else:
  print('Yes')

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

S=input()
if S!="AAA" and S!="BBB":
    print("Yes")
else:
    print("No")

S=input()

list=[]
t=0
while t<=2:
    list.append(S[t])
    t=t+1

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

s = input()

s_count_A = s.count('A')

if s_count_A == 0 or s_count_A == 3:
    ans = 'No'
else:
    ans = 'Yes'

print(ans)

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

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


from collections import Counter
s = input()
s = Counter(s)
if len(s)==1:
    print('No')
else:
    print('Yes')

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

s = input()

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


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

def main():
    chars = input()
    if (chars[0] == chars[1] and chars[1] == chars[2]):
        print("No")
    else:
        print("Yes")


main()


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

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

import os, sys, re, math

S = input()

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


S = input()

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

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

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

# AAA or BBB ならNo

S = list(input())

S_sorted = ''.join(sorted(S))
# print(S_sorted)

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


S = input()
ans = 'Yes'
if not 'A' in S:
    ans = 'No'
if not 'B' in S:
    ans = 'No'
print(ans)

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

S = input()

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

def readinput():
    s=input()
    return s

def main(s):
    if s == 'AAA' or s == 'BBB':
        return 'No'
    else:
        return 'Yes'

def __starting_point():
    s=readinput()
    ans=main(s)
    print(ans)

__starting_point()

S = input()

if S == "AAA": print("No")
elif S == "AAB": print("Yes")
elif S == "ABA": print("Yes")
elif S == "BAA": print("Yes")
elif S == "ABB": print("Yes")
elif S == "BAB": print("Yes")
elif S == "BBA": print("Yes")
elif S == "BBB": print("No")

# 駅１、２、３
# 管理状況はAAB,ABA、BBA,BBBなど、長さ３の文字列で表される
# AとBの駅の間にはバスを運行することにした
# バスが運行することになる組み合わせが存在するかどうか判定し、yes,noで出力
s = input('')
if s == 'AAA' or s == 'BBB':
    print('No')
else:
    print('Yes')

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


s=input()

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



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


def atc_158a(input_value: str) -> str:
    if input_value == "AAA" or input_value == "BBB":
        return "No"
    return "Yes"


input_value = input()
print(atc_158a(input_value))

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

print(['Yes','No'][len(set(input()))==1])

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

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

print(" NYoe s"[len(set(input()))::2])

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

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


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

print('YNeos'[len(set(input()))&1::2])

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

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

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

S = input()

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

Station = []
Station = input()

if Station == "AAA":
    print("No")

elif Station == "BBB":
    print("No")
else:
    print("Yes")

s = input()

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

print('YNeos'[len(set(input()))==1::2])

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

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

moji = str(input())
print(("No","Yes")[("B" in moji) and ("A" in moji)])

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

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

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

S = input()

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

from sys import stdin,stdout
for _ in range(1):#int(stdin.readline())):
    # n=int(stdin.readline())
    # a=list(map(int,stdin.readline().split()))
    s=len(set(input()))
    print('Yes' if s>1 else 'No')

S = input()

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

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

print(['Yes','No'][len(set(input()))&1])

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

def resolve():
    s = input()
    if s.count('A') == 0 or s.count('B')== 0:
        print('No')
    else:
        print('Yes')
resolve()

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

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

d = input()

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

S = input()

if S == 'AAA':
    print('No')
if S == 'AAB':
    print('Yes')
if S == 'ABA':
    print('Yes')
if S == 'ABB':
    print('Yes')
if S == 'BAA':
    print('Yes')
if S == 'BAB':
    print('Yes')
if S == 'BBA':
    print('Yes')
if S == 'BBB':
    print('No')

S = input()

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

#ABC158
S = input()
#----------以上入力----------
if 'A' in S and 'B' in S:
    print('Yes')
else:
    print('No')

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

S = input()

S = list(S)

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

S=input()
print('Yes') if abs(S.count('A')-S.count('B'))!=3 else print('No')

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

s = input()

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


s = input()

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

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