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

S = input()

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

Solution (Python):
import itertools
import math
import string
import collections
from collections import Counter
from collections import deque
from operator import itemgetter
import sys
sys.setrecursionlimit(2*10**5)
INF = 2**60


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


def nCr(n, r):
    return math.factorial(n)//(math.factorial(n-r)*math.factorial(r))


def has_duplicates2(seq):
    seen = []
    for item in seq:
        if not(item in seen):
            seen.append(item)
    return len(seq) != len(seen)


def divisor(n):
    divisor = []
    for i in range(1, n+1):
        if n % i == 0:
            divisor.append(i)
    return divisor



dx = [-1, -1, -1, 0, 0, 1, 1, 1]
dy = [-1, 0, 1, -1, 1, -1, 0, 1]
s = input()
if s == 'BBB' or s == 'AAA':
    print('No')
    exit()
print('Yes')

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

Solution (Python):
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**7)
from collections import Counter, deque
from collections import defaultdict
from itertools import combinations, permutations, accumulate, groupby, product
from bisect import bisect_left,bisect_right
from heapq import heapify, heappop, heappush
from math import floor, ceil
from operator import itemgetter
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def LI2(): return [int(input()) for i in range(n)]
def MXI(): return [[LI()]for i in range(n)]
def printns(x): print('\n'.join(x))
def printni(x): print('\n'.join(list(map(str,x))))
inf = 10**17
mod = 10**9 + 7


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

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

Solution (Python):
from sys import stdin
def main():
    
    readline=stdin.readline
    S=readline().strip()
    if S=="AAA" or S=="BBB":
        print("No")
    else:
        print("Yes")
if __name__=="__main__":
    main()

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

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

  return

if __name__ == "__main__":
  resolve()

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

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

Solution (Python):
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

s = readline().rstrip().decode()
print('Yes' if 'A' in s and 'B' in s else 'No')

Solution (Python):
import sys

sys.setrecursionlimit(10 ** 7)
f_inf = float('inf')
mod = 10 ** 9 + 7


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


if __name__ == '__main__':
    resolve()

Solution (Python):
import sys
input = sys.stdin.readline
S = set(list(input())[: -1])
if len(S) > 1: print("Yes")
else: print("No")

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

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

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

Solution (Python):

class abc_158:
    
    def __init__(self):
        pass
    
    def A(self):
        S=input()
        if "BA" in S or "AB" in S:print("Yes")
        else:print("No")
    
    def B(self):
        NAB=list(map(int,input().split()))
        tail = NAB[0]%(NAB[1]+NAB[2]) if NAB[0]%(NAB[1]+NAB[2])<NAB[1] else NAB[1]
        ans=((NAB[0]/(NAB[1]+NAB[2]))*NAB[1])+tail
        print(int(ans))
            
    def C(self):
        AB=list(map(int,input().split()))
        ans=-1
        
        
        for i in range(1,101):
            if AB[0]==int(i*0.08) and AB[1]==int(i*0.1):
                ans=i
                break
            else:continue
        print(ans)
            
    def D(self):
        pass
        
    def E(self):
        pass
    
    def F(self):
        pass
    
    
if __name__=='__main__':
    obj=abc_158()
    obj.A()

Solution (Python):
S=input()

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

Solution (Python):
s = input()
m = s[0]
for i in range(2):
    if m !=  s[1+i]:
        print('Yes')
        break
else:
    print('No')

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

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

Solution (Python):

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

Solution (Python):
from sys import stdin
S = stdin.readline().rstrip()
print('No' if S == 'AAA' or S == 'BBB' else 'Yes')

Solution (Python):
N = input()
if N=="AAA" or N=="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 "A" in S and "B" in S:
    print("Yes")

else:
    print("No")

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

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

Solution (Python):
S = input()
if 'A' not in S:
  print('No')
elif 'B' not in S:
  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()
ln = len(s)

for i in range(0, ln-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):
S=raw_input()
if S[0]!=S[1] or S[0]!=S[2] or S[1]!=S[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()

if len(set(S)) > 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":
    ans = "No"
else:
    ans = "Yes"

print(ans)

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

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

Solution (Python):
S = str(input())
C = set(S)
if len(C) == 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 "B" in s and "A" in s:
    print("Yes")
else:
    print("No")

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

    if S.count(S[0]) == 3:
        print('No')
    else:
        print('Yes')


if __name__ == '__main__':

    ABC_158_A()

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

Solution (Python):
S = input()

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

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

Solution (Python):
import sys

s = input()

for i in range(len(s)-1):
    if s[i] != s[i+1]:
        print("Yes")
        sys.exit()
    
print("No")

Solution (Python):

s = input()
print(["No", "Yes"][0 < s.count("A") < 3])

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

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

Solution (Python):

import sys

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

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

Solution (Python):



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

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

Solution (Python):


from fractions import gcd
from collections import Counter, deque, defaultdict
from heapq import heappush, heappop, heappushpop, heapify, heapreplace, merge
from bisect import bisect_left, bisect_right, bisect, insort_left, insort_right, insort
from itertools import accumulate, product, permutations, combinations, combinations_with_replacement

S = input()

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

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

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

Solution (Python):
import sys
stdin = sys.stdin
sys.setrecursionlimit(10 ** 7)

def LI(): return list(map(int, stdin.readline().split()))
def LS(): return list(stdin.readline())

s = LS()
if 'A' in s:
    if 'B' in s:
        print('Yes')
        exit()
print('No')

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):
a=input()
if "A" in a and "B" in a:
    print("Yes")
else:
    print("No")

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

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

Solution (Python):
val = input()

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

Solution (Python):
s = input()

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

Solution (Python):
S = input()

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

Solution (Python):

"""
Created on Thu May  7 00:55:20 2020

@author: shinba
"""

S = input()

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

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

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

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

Solution (Python):

S = input()
a = "AAA"
b = "BBB"
if S == a:
    print("No")
elif S == b:
    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]==S[2]:
    print("No")
else:
    print("Yes")

Solution (Python):

S = input()

print("Yes" if S.count("A")==2 or S.count("B")==2 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  = list(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()
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=="AAA"or s=="BBB":
  print("No")
else:
  print("Yes")

Solution (Python):
s = list(input())
a, b = 0, 0
a = s.count('A')
b = s.count('B')

if a > 0 and b > 0:
    print('Yes')
else:
    print('No')

Solution (Python):
s = list(input())
a, b = 0, 0
a = s.count('A')
b = s.count('B')

if a > 0 and b > 0:
    print('Yes')
else:
    print('No')

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

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

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

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

    print('No')


resolve()

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):
lst=list(str(input()))
a=set()
for i in range(3):
  a.add(lst[i])
if len(a)==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()
if len(set(s)) > 1:
    print('Yes')
else:
    print('No')

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

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

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

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

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

Solution (Python):
S = input()

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

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

Solution (Python):
import sys
sys.setrecursionlimit(10 ** 6)

int1 = lambda x: int(x) - 1
def II(): return int(input())

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

def LI(): return list(map(int, input().split()))
def LI1(): return list(map(int1, input().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]

INF = float('inf')

def solve():
    S = list(input())

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


if __name__ == '__main__':
    solve()

Solution (Python):
S = [c for c in input()]
print("Yes" if len(set(S))==2 else "No")

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

Solution (Python):
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop
from itertools import permutations, accumulate
from math import sqrt, ceil, floor, factorial
from bisect import bisect_left, bisect_right
from copy import deepcopy
from operator import itemgetter
from fractions import gcd
import sys
def I(): return int(input())  
def Is(): return map(int, input().split())  
def LI(): return list(map(int, input().split()))  
def TI(): return tuple(map(int, input().split()))  
def IR(n): return [I() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def TIR(n): return [TI() for _ in range(n)]
def S(): return input()
def Ss(): return input().split()  
def LS(): return list(input())  
def SR(n): return [S() for _ in range(n)]
def SsR(n): return [Ss() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
sys.setrecursionlimit(1000000)
MOD = 1000000007
INF = float('inf')

s = S()
a = s.count("A")
if a == 0 or a == 3:
    print("No")
else:
    print("Yes")

Solution (Python):
S = input()

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

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

Solution (Python):
def main():
    S = input()
    if len(set(s for s in S)) == 1:
        print("No")
    else:
        print("Yes")


if __name__ == '__main__':
    main()

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

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

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

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

Solution (Python):
s = input()

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

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

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

Solution (Python):
s = input()

if s[1] == s[0] == 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 = set(list(input()))

print('Yes' if len(S) == 2 else 'No')

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


main()

Solution (Python):
import sys
sys.setrecursionlimit(10 ** 5 + 10)
def input(): return sys.stdin.readline().strip()

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

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

Solution (Python):

import collections
import itertools as it
import math


s = input()







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

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

print(ans)

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

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

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

Solution (Python):
import math
import queue
from collections import defaultdict
 
def readInt():
	return int(input())
def readInts():
	return list(map(int, input().split()))
def readChar():
	return input()
def readChars():
	return input().split()
def factorization(n):
	res = []
	if n%2==0:
		res.append(2)
	for i in range(3,math.floor(n//2)+1,2):
		if n%i==0:
			c = 0
			for j in res:
				if i%j==0:
					c=1
			if c==0:
				res.append(i)
	return res
def fact2(n):
	p = factorization(n)
	res = []
	for i in p:
		c=0
		z=n
		while 1:
			if z%i==0:
				c+=1
				z/=i
			else:
				break
		res.append([i,c])
	return res
def fact(n):
	ans = 1
	m=n
	for _i in range(n-1):
		ans*=m
		m-=1
	return ans
def comb(n,r):
	if n<r:
		return 0
	l = min(r,n-r)
	m=n
	u=1
	for _i in range(l):
		u*=m
		m-=1
	return u//fact(l)
def printQueue(q):
	r=q
	ans=[0]*r.qsize()
	for i in range(r.qsize()-1,-1,-1):
		ans[i] = r.get()
	print(ans)

s = readChar()
x = list(s)
a = [0,0]
for i in x:
	if i=="A":
		a[0]+=1
	else:
		a[1]+=1

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

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

result = True

for i in range(len(S)-1):
   
    if S[i] != S[i+1]:
        result = True
        break
    elif S[i] == S[i+1]:
        result = False


if result == False:
    print("No")
else:
     print("Yes")

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

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


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


if __name__ == '__main__':
    main()

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

Solution (Python):


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

Solution (Python):

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

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

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

if __name__ == "__main__":
    solve()

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

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

if __name__ == "__main__":
    solve()

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

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

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

Solution (Python):
s = input()

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

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

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

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

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

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

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

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

Solution (Python):
S=[x for x in input()]
s=len(list(set(S)))

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

Solution (Python):
print("YNeos"[len(set(list(input())))==1::2])

Solution (Python):
s = input()
p = s.count('A')
q = s.count('B')
if p == 3 or q == 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 = set(list(input()))

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

Solution (Python):
S=input()

Ans='No'

for i in range(len(S)-1):
    if S[i]!=S[i+1]:
        Ans='Yes'
        break
        
print(Ans)

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

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

if input_list[0] == input_list[1] and input_list[0] == input_list[2]:
  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()
if S[0] == 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):
import sys
sys.setrecursionlimit(10**6) 
import math

from copy import copy, deepcopy
from operator import itemgetter

import bisect

from collections import deque 



from collections import Counter

from itertools import accumulate

from heapq import heapify,heappop,heappush


def input(): return sys.stdin.readline()[:-1]
def printl(li): print(*li, sep="\n")
def argsort(s): return sorted(range(len(s)), key=lambda k: s[k])



S = input()





















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

Solution (Python):

s = input()
a = s.count("A")
b = s.count("B")
print("Yes" if a==2 or b==2 else "No")

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

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

Solution (Python):
S = input()

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

Solution (Python):
s = input()

s = set(s)

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

Solution (Python):
S = input()
count = 0
for i in range(len(S)-1):
    if S[i] != S[i+1]:
      count+=1
    else:
      continue
if count>=1:
  print('Yes')
else:
  print('No')

Solution (Python):
s=input()

a=0
b=0

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

Solution (Python):
s =input()

c = s.count('A')

if c == 3:
    print("No")
elif c == 0:
    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]==S[2]==S[0]:
    print("No")
else:
    print("Yes")

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

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

Solution (Python):
S = input()

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

print('Yes')

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

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

Solution (Python):
s = input()

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

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

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

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

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

Solution (Python):
S=input()

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

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

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