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

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

Solution (Python):




n = str(input())



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

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

Solution (Python):





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

Solution (Python):
s = input()
if len(s) != 3:
    print('No')
if s.upper() == 'AAA' or s.upper() == 'BBB' :
    print('No')
else:
    print('Yes')

Solution (Python):
S = input()

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

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

Solution (Python):

s = input()
s = set([ss for ss in s])
if len(s) > 1:
  print('Yes')
else:
  print('No')

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

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

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

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

Solution (Python):


stations = input() 

def needBus(s):
  '''<str> s: 3 stations'''
  if ((s[0] != s[1]) or (s[1] != s[2])):
    return 'Yes'
  else:
    return 'No'
  

print(needBus(stations))

Solution (Python):
S = input()

f = S[0]
for s in S[1:]:
    if f != s:
        print('Yes')
        break
else:
    print('No')

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

Solution (Python):
S = input()

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

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

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

Solution (Python):
char_a = input()
first = char_a[0]
count = 0
for i in [1,2]:
  if char_a[i] != first:
    count += 1
    print("Yes")
    break
if count == 0: 
  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):
s = input()
if s[0] == s[1] and s[1] == s[2]:
    print('No')
else:
    print('Yes')

Solution (Python):
x,y,z = input()
if x == y and y == z and x == y:
    print('No')
else:
    print('Yes')

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

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

flag = False

if S[0] != S[1]:
    flag = True

if S[1] != S[2]:
    flag = True

if flag:
    print("Yes")

else:
    print("No")

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

Solution (Python):
S = input()

if S[0]==S[1] and S[0] == S[1] and S[2] == S[0]:
	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):
print(["No","Yes","Yes","No"][sum([s=="A" for s in input()])])

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

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

Solution (Python):
S = input()

if len(set(S)) == 1:
    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 len(set(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.count('AB') is 0 and S.count('BA') is 0:
    print('No')
else:
    print('Yes')

Solution (Python):
S = str(input())
if S.count('AB') is 0 and S.count('BA') is 0:
    print('No')
else:
    print('Yes')

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

Solution (Python):
s=input()
ca=0
for i in s:
  if(i=="A"):
    ca+=1
if(ca==1 or ca==2):
  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()
print('No' if s == 'AAA' or s == 'BBB' else 'Yes')

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

Solution (Python):
s=input()
if s == "ABB" :
    print("Yes")
elif s == "AAB" :
    print("Yes")
elif s == "ABA" :
    print("Yes")
elif s == "BAA" :
    print("Yes")
elif s == "BBA" :
    print("Yes")
elif s == "BAB" :
    print("Yes")
else :
    print("No")

Solution (Python):
S = input()

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

Solution (Python):
class Solution:
    def solve(self, S: str) -> str:

        if S == 'AAA' or S == 'BBB':
            return 'No'
        else:
            return 'Yes'


if __name__ == '__main__':

    
    S = input()

    
    solution = Solution()
    print(solution.solve(S))

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

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

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

Solution (Python):
buses = input()
first = buses[0]
count = 0
for i in buses:
	if (i == first):
    	   count += 1
if count == len(buses):
	print("No")
else:
	print("Yes")

Solution (Python):
S=input()
i=len(set(S))
if i==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):
S = str(input())
if 'AB' in S or 'BA' in S:
  print('Yes')
else:
  print('No')

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

Solution (Python):
S = input()
ans = 'Yes'
if S == 'AAA':
    ans = ('No')
if S == 'BBB':
    ans = ('No')

print(ans)

Solution (Python):
S = input()
A = 0
B = 0
for i in S:
    if i == "A":
        A+=1
    elif i == "B":
        B += 1

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

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

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

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

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

Solution (Python):
s = input()
vis_a = 0
vis_b = 0

for i in s:
  if i == 'A':
    vis_a = 1
  if i == 'B':
    vis_b = 1

if vis_a and vis_b:
    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.count('A') == 3 or 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()
if S =="AAA" or S =="BBB":
    print("No")
else:
    print("Yes")

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

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 ('AB' in s or 'BA' 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()
count=0
for i in range(2):
  if S[i]==S[i+1]:
    count+=1
if count==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 math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,copy,functools
import time,random

sys.setrecursionlimit(10**7)
inf = 10**20
eps = 1.0 / 10**10
mod = 10**9+7
mod2 = 998244353
dd = [(-1,0),(0,1),(1,0),(0,-1)]
ddn = [(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(): return [list(map(int, l.split())) for l in sys.stdin.readlines()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
def pf(s): return print(s, flush=True)
def pe(s): return print(str(s), file=sys.stderr)
def JA(a, sep): return sep.join(map(str, a))
def JAA(a, s, t): return s.join(t.join(map(str, b)) for b in a)


def main():
    s = S()
    c = collections.Counter(s)
    if len(c) == 1:
        return "No"

    return "Yes"


print(main())

Solution (Python):
S = input()

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

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

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

Solution (Python):


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

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

Solution (Python):
S = set([c for c in input()])

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

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

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

Solution (Python):
S = input()

A = 0
B = 0

for i in S:
    if i == 'A':
        A += 1
    else:
        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 = input()
if s[0] == s[1] and s[1] == s[2] and s[2] == s[0]:
  print("No")
  exit()
  
print("Yes")

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

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

Solution (Python):
s = input()

a = s.count("A")
b = s.count("B")

if a * b == 0:
    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" or s == "BBB":
    print("No")
else:
    print("Yes")

Solution (Python):

S = input()
print('No' if S == (S[0] * len(S)) else 'Yes')

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

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

Solution (Python):
s = input()

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

if s != "AAA" and s != "BBB":
  print("Yes")

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

Solution (Python):
import sys
from collections import Counter

sys.setrecursionlimit(1000000)
input = lambda: sys.stdin.readline().rstrip()

S = input()
print('Yes' if len(Counter(S).keys()) == 2 else 'No')

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

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

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

Solution (Python):


n = input()
if "AB" in n or "BA" in n:
    print("Yes")
else:
    print("No")

Solution (Python):
import sys
sys.setrecursionlimit(1000000)
input = sys.stdin.readline
from bisect import *
from collections import *
from heapq import *
INF = 500000
mod = 10**9+7

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

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

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

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

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

Solution (Python):
import unittest


class TestA(unittest.TestCase):
    def test_1(self):
        self.assertEqual(think('ABA'), 'Yes')

    def test_2(self):
        self.assertEqual(think('BBA'), 'Yes')

    def test_3(self):
        self.assertEqual(think('BBB'), 'No')


def solve():
    s = read()
    result = think(s)
    write(result)


def read():
    return read_line(n=3)


def read_int(n):
    return read_type(int, n, sep=' ')


def read_float(n):
    return read_type(float, n, sep=' ')


def read_type(t, n, sep):
    return list(map(lambda x: t(x), read_line().split(sep)))[:n]


def read_line(n=0):
    if n == 0:
        return input().rstrip()
    else:
        return input().rstrip()[:n]


def think(s):
    return 'Yes' if len(set(list(s))) == 2 else 'No'


def write(result):
    print(result)


if __name__ == '__main__':
    
    solve()

Solution (Python):
S = input()
result = set()

for s in S:
  result.add(s)

if len(result) == 2:
  ans = 'Yes'
else:
  ans = 'No'

print(ans)

Solution (Python):
"""
    Template written to be used by Python Programmers.
    Use at your own risk!!!!
    Owned by enraged(rating - 5 star at CodeChef and Specialist at Codeforces).
"""
import sys
import bisect
import heapq
from math import *
from collections import defaultdict as dd  
from collections import deque  
from collections import Counter as c  
from itertools import combinations as comb
from bisect import bisect_left as bl, bisect_right as br, bisect



mod = pow(10, 9) + 7
mod2 = 998244353
def data(): return sys.stdin.readline().strip()


def out(var): sys.stdout.write(var)


def l(): return list(map(int, data().split()))


def sl(): return list(map(str, data().split()))


def sp(): return map(int, data().split())


def ssp(): return map(str, data().split())


def l1d(n, val=0): return [val for i in range(n)]


def l2d(n, m, val=0): return [[val for i in range(n)] for j in range(m)]


s = data()
s = sorted(s)
if s[0] == s[2]:
    out("No")
    exit()
out("Yes")

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

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

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

S.sort()
if S[-1]=="A" or S[0]=="B":
    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(set(S)) != 1):
    print('Yes')
else:
    print('No')

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

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

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

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

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

Solution (Python):
import sys
import itertools

INF = 1001001001

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

if __name__ == "__main__":
    resolve()

Solution (Python):
from heapq import heappush,heappop,heapify
from collections import deque,defaultdict,Counter
import itertools
from functools import *
from itertools import permutations,combinations,groupby
import sys
import bisect
import string
import math
import time
import random
def Golf():
    *a,=map(int,open(0))
def S_():
    return input()
def IS():
    return input().split()
def LS():
    return [i for i in input().split()]
def I():
    return int(input())
def MI():
    return map(int,input().split())
def LI():
    return [int(i) for i in input().split()]
def LI_():
    return [int(i)-1 for i in input().split()]
def NI(n):
    return [int(input()) for i in range(n)]
def NI_(n):
    return [int(input())-1 for i in range(n)]
def StoI():
    return [ord(i)-97 for i in input()]
def ItoS(nn):
    return chr(nn+97)
def LtoS(ls):
    return ''.join([chr(i+97) for i in ls])
def GI(V,E,Directed=False,index=0):
    org_inp=[]
    g=[[] for i in range(n)]
    for i in range(E):
        inp=LI()
        org_inp.append(inp)
        if index==0:
            inp[0]-=1
            inp[1]-=1
        if len(inp)==2:
            a,b=inp
            g[a].append(b)
            if not Directed:
                g[b].append(a)
        elif len(inp)==3:
            a,b,c=inp
            aa=(inp[0],inp[2])
            bb=(inp[1],inp[2])
            g[a].append(bb)
            if not Directed:
                g[b].append(aa)
    return g,org_inp
def GGI(h,w,search=None,replacement_of_found='.',mp_def={'

    mp=[1]*(w+2)
    found={}
    for i in range(h):
        s=input()
        for char in search:
            if char in s:
                found[char]=((i+1)*(w+2)+s.index(char)+1)
                mp_def[char]=mp_def[replacement_of_found]
        mp+=[1]+[mp_def[j] for j in s]+[1]
    mp+=[1]*(w+2)
    return h+2,w+2,mp,found
def bit_combination(k,n=2):
    rt=[]
    for tb in range(n**k):
        s=[tb//(n**bt)%n for bt in range(k)]
        rt+=[s]
    return rt
def show(*inp,end='\n'):
    if show_flg:
        print(*inp,end=end)
YN=['YES','NO']
Yn=['Yes','No']
 
mo=10**9+7
inf=float('inf')
l_alp=string.ascii_lowercase
u_alp=string.ascii_uppercase


input=lambda: sys.stdin.readline().rstrip()
 
def ran_input():
    import random
    n=random.randint(4,16)
    rmin,rmax=1,10
    a=[random.randint(rmin,rmax) for _ in range(n)]
    return n,a

def ran_input():
    import random
    n=random.randint(4,16)
    rmin,rmax=1,10
    a=[random.randint(rmin,rmax) for _ in range(n)]
    return n,a

show_flg=False
show_flg=True


st=set(input())
print(Yn[2-len(st)])

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

Solution (Python):



a = input()

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

Solution (Python):
str = input()
if str == "AAA" or 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(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[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[1]==s[2]:
  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 = list(input())

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

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

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

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


s = input()

if "AB" in s:
  print("Yes")
elif "BA" in s:
  print("Yes")
else:
  print("No")

Solution (Python):
input = input()

if input.find('A') != -1 and input.find('B') != -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):
A = input()
if A[0] == A[1] and A[1] == A[2]:
  print("No")
else:
  print("Yes")

Solution (Python):
S = list(input())
a = "".join(map(str,S[0:2]))
b = "".join(map(str,S[1:3]))
ans = "No"
if a == "AB" or a == "BA":
    ans = "Yes"
if b == "AB" or b == "BA":
    ans = "Yes"
print(ans)

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

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

Solution (Python):
s = input()
if s in ["AAA","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 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=raw_input("")
temp=temp1=0
for i in range(3):
    if (s[i]=="A"):
        temp=1
    if (s[i]=="B"):
        temp1=1
if(temp*temp1):
    print "Yes"
else:
    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[0] == s[1] and s[1] == s[2] else "Yes")

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

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

Solution (Python):
total = input()
a = total[0]
b = total[1]
c = total[2]
if a != b:
  print("Yes")
elif b != c:
  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 print("Yes")

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

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

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

print(ans)

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

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

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

Solution (Python):
S = input()

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

Solution (Python):
management_conditions = input()
if management_conditions == 'AAA' or management_conditions == '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!='AAA' and S!='BBB':
  print('Yes')
else:
  print('No')

Solution (Python):
st = input()
if st == 'A'*3 or st == 'B'*3:
    print('No')
else:
    print('Yes')

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

Solution (Python):
s = input()
count_a = s.count('A')

if count_a == 0 or count_a == 3:
    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
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

s = input()
y(s != s[0] * 3)

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

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

Solution (Python):
from sys import stdin
S = list(stdin.readline().rstrip())
if len(set(S)) != 1:
    print('Yes')
else:
    print('No')

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

Solution (Python):
s = input()

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

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

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

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

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

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

Solution (Python):
S=input()

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

Solution (Python):
a,b,c = input()
if a == b == c:
    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" or S == "BBB":
  print("No")
else:
  print("Yes")

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

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

Solution (Python):
S=input()
for i in S:
    if S[0]!=i:
        print('Yes')
        exit()
print('No')

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

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

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

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

Solution (Python):
char_a = input()
first = char_a[0]
count = 0
for i in [1,2]:
  if char_a[i] != first:
    count += 1
    print("Yes")
    break
if count == 0: 
  print("No")

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

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

Solution (Python):
N = input()
ans = 'Yes'
n0 = N[0]
count = 0
if N[0] == N[1]:
    count = count + 1
if N[1] == N[2]:
    count = count + 1
if N[0] == N[2]:
    count = count + 1
if count == 3:
    ans = 'No'
print(ans)

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

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

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

Solution (Python):
s = 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()
fg = 0
for i in range(2):
    if s[i] != s[i+1]:
        fg = 1
if fg == 1:
    print("Yes")
else:
    print("No")

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

Solution (Python):
s = input()
print('NYoe s'['A' in s and 'B' in s::2])

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