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 itertools
import sys
import math
import numpy as np
from collections import deque
from itertools import combinations
from functools import reduce
from functools import lru_cache
sys.setrecursionlimit(10**9)

def main():
    S = input()
    f = S[0] == S[1] == S[2]

    print("No" if f else "Yes")




if __name__ == "__main__":
  main()

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


from queue import Queue
from queue import LifoQueue as Stack
from math import sqrt, floor, ceil, log2
from fractions import gcd
from itertools import permutations, combinations
from operator import itemgetter
from functools import cmp_to_key



__MOD__=(10**9)+7
yn = 'YNeos'
judge = False
cnt = 0
ans = None


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

def intinput():
    return int(input())

def mulinputs():
    return map(int,input().split())

def lineinputs(func=intinput):
    datas = []
    while True:
        try:
            datas.append(func())
        except EOFError:
            break
    return datas

class ModInt():
    def __init__(self, x):
        self.__x = (x % __MOD__)
    def __add__(self, other):
        if type(other) == int:
            other = self.__class__(other)
            return int(self.__class__((self.__x + other.__x)%__MOD__))
        elif type(other) == ModInt:
            return self.__class__((self.__x + other.__x)%__MOD__)
        else:
            raise Exception("Not Int or Not ModInt")
    def __sub__(self, other):
        if type(other) == int:
            other = self.__class__(other)
            return int(self.__class__((self.__x - other.__x)%__MOD__))
        elif type(other) == ModInt:
            return self.__class__((self.__x - other.__x)%__MOD__)
        else:
            raise Exception("Not Int or Not ModInt")
    def __mul__(self, other):
        if type(other) == int:
            other = self.__class__(other)
            return int(self.__class__((self.__x * other.__x)%__MOD__))
        elif type(other) == ModInt:
            return self.__class__((self.__x * other.__x)%__MOD__)
        else:
            raise Exception("Not Int or Not ModInt")
    def __truediv__(self, other):
        if type(other) == int:
            other = self.__class__(other)
            return int(self.__class__((self.__x * other.__modinv())%__MOD__))
        elif type(other) == ModInt:
            return self.__class__((self.__x * other.__modinv())%__MOD__)
        else:
            raise Exception("Not Int or Not ModInt")
    def __pow__(self, other):
        if type(other) == int:
            other = self.__class__(other)
            return int(self.__class__(pow(self.__x, other.__x, __MOD__)))
        elif type(other) == ModInt:
            return self.__class__(pow(self.__x, other.__x, __MOD__))
        else:
            raise Exception("Not Int or Not ModInt")
    def __modinv(self, m=__MOD__):
        a = self.__x
        if a == 0:
            raise ZeroDivisionError()
        if gcd(a, m) != 1:
            raise Exception("%sの逆数は求まりません。" % a)
        b, u, v = m, 1, 0
        while b != 0:
            t = a//b;
            a -= t*b
            a, b = b, a
            u -= t * v
            u, v = v, u
        u %= m
        if u < 0:
            u += m
        return u
    def __int__(self):
        return self.__x



if __name__ == '__main__':
    S = input()
    if len(list(filter(lambda x : x=='A', S))) == 3:
        print ('No')
    elif len(list(filter(lambda x : x=='A', S))) == 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()
s1 = S[0]
s2 = S[1]
s3 = S[2]

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

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

S = input().strip()

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

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

t = s[0]
ans = 'No'
for i in range(len(s)):
    if s[i] != t:
        ans = 'Yes'

print(ans)

Solution (Python):

import sys

YES = "Yes"  
NO = "No"  


def solve(S: str):
    if "AAA" in S or "BBB" in S:
        print(NO)
    else:
        print(YES)

def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    S = next(tokens)  
    solve(S)

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


import sys
import math


debug = False

def log(text):
    if debug:
        print(text)

def parse_input(lines_as_string = None):

    global debug
    lines = []
    if lines_as_string is None:
        debug = False
        
        
        lines.append(input())
    else:
        debug = True
        lines = [e for e in lines_as_string.split("\n")][1:-1]

    s = lines[0]

    return (s, )


def solve(s):
    
    
    result = 'Yes'
    if s == 'AAA' or s == 'BBB':
        result = 'No'

    return result
    


def main():
    
    result = solve(*parse_input())
    if isinstance(result, list):
        for r in result:
            print("%s" % r, sep='')
    else:
        print("%s" % result, sep='')

if __name__ == '__main__':

    main()

Solution (Python):
S=list(input())
f=0
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")
    exit()
print("Yes")

Solution (Python):
import sys
sys.setrecursionlimit(700000)

def s_in():
    return input()

def n_in():
    return int(input())

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

def print_l(l):
    print(' '.join(map(str, l)))

class Interval():
    def __init__(self, li):
        self.li = li
        self.n = len(li)
        self.sum_li = [li[0]]
        for i in range(1, self.n):
            self.sum_li.append(self.sum_li[i-1] + li[i])

    def sum(self, a, b=None):
        if b is None:
            return self.sum(0, a)

        res = self.sum_li[min(self.n-1, b-1)]
        if a > 0:
            res -= self.sum_li[a-1]
        return res

s = s_in()

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

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

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

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

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






    return 0
if __name__ == '__main__':
    main()

Solution (Python):
S = input()

for i in range(2):
    if S[i] != S[i+1]:
        print('Yes')
        exit()
print('No')

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

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

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

Solution (Python):
s=input()
S1=s[0]
S2=s[1]
S3=s[2]

if S1==S2==S3=="A":
    print("No")
elif S1==S2==S3=="B":
    print("No")
else:
    print("Yes")

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

Solution (Python):

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

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

    S_list = list(S)

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

    print('Yes')
    return

if __name__ == "__main__":
    resolve()

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

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

print("Yes")

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

Solution (Python):
S = input()

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

else:print('Yes')

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

Solution (Python):

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

Solution (Python):
S = input()

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

Solution (Python):
import sys
import math
def i():return int(sys.stdin.readline().replace("\n",""))
def i2():return map(int,sys.stdin.readline().replace("\n","").split())
def s():return str(sys.stdin.readline().replace("\n",""))
def l():return list(sys.stdin.readline().replace("\n",""))
def intl():return [int(k) for k in sys.stdin.readline().replace("\n","").split()]
def lx():return list(map(lambda x:int(x)*-1,sys.stdin.readline().replace("\n","").split()))
def t():return tuple(map(int,sys.stdin.readline().replace("\n","").split()))

if __name__ == "__main__":pass
s = l()
s = list(set(s))
print("Yes" if len(s)==2 else "No")

Solution (Python):
s = input()
flag = True
for i in range(len(s)-1):
    if s[i] != s[i+1]:
        flag = False
if flag:
    print('No')
else:
    print('Yes')

Solution (Python):


temp = set([s for s in input()])


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

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

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

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

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

Solution (Python):
T = input()

a = 0
b = 0 
for s in T:
    if s == 'A':
        a += 1
    elif s == 'B':
        b += 1

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

Solution (Python):
S=input()

for i in range(3):
    if S[0]==S[1]==S[2]:
        print("No")
        break
    else:
        print("Yes")
        break

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

if(s[0] == 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 = list(input())
if s.count("A") == 3 or s.count("B") == 3:
    print("No")
else:
    print("Yes")

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

if ans >= 2:
    print("Yes")
else:
    print("No")

Solution (Python):
s = input()

ans = 'No'

s = list(set(s))

if len(s) != 1:
    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 "A" in s and "B" in s:
	print("Yes")
else:
	print("No")

Solution (Python):
S=input()
if (S=="AAA") | (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 len(set(s)) !=1:
    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] == 'A' and s[1] == 'A' and s[2] == 'A':
    print('No')
elif s[0] == 'B' and s[1] == 'B' and s[2] == 'B':
    print('No')
else:
    print('Yes')

Solution (Python):

s= input()

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

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

if "B" not in S or "A" not in S:
    print("No")
    exit()
print("Yes")

Solution (Python):
s=list(input())
if len(set(s))==1:
  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('Yes' if len(set(s)) != 1 else 'No')

Solution (Python):
S = input()
count = 0
for i in range(len(S)):
    if S[0] == S[i]:
        count += 1
if count == 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[0] == S[1] and S[1] == S[2]):
    print('No')
else:
    print('Yes')

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

Solution (Python):
s = input()
a,b,c = s[0], s[1], s[2]
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):
ls=list(set(list(input())))

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

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

Solution (Python):
s = input()

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

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

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

Solution (Python):
w = set(input())
if "A" in w and "B" in w :
    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(set(list(s))) == 2:
  print('Yes')
else:
  print('No')

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

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

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

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

Solution (Python):
import numpy as np
import math as m

def main(**kwargs):
    res = "Yes"

    if S == "AAA" or S == "BBB":
        res = "No"

    return res

if __name__ == "__main__":
    cin = np.array(input().split(" "))
    S, *_ = cin

    cout = main(S=S)
    print(cout)

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

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

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

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

if __name__ == "__main__":
    main()

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

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

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

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

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

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

Solution (Python):

import sys
import math
import numpy as np
import itertools

p=input()

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

Solution (Python):

''':'
docker run --rm -it -v $(cd $(dirname $0) && pwd):/vo:ro pypy:3-2.4.0 \
   /bin/bash -c "pypy3 /vo/$(basename $0) < /vo/g.inp"
exit $?
'''
import sys

def _s(): return sys.stdin.readline().strip()

def main():
    a = set(c for c in _s())
    if len(a)==1: print("No")
    else: print("Yes")

if __name__ == "__main__":
    main()

Solution (Python):
S = input()

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

Solution (Python):
S = input()

fa = 0
fb = 0
for i in range(3):
    if S[i] == "A":
        fa = 1
    if S[i] == "B":
        fb = 1

if fa == 1 and fb == 1:
    print("Yes")
else:
    print("No")

Solution (Python):
import numpy as np

S =str(input())

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

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

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

Solution (Python):

import sys

YES = "Yes"  
NO = "No"  


def solve(S: str):
    if len(set([S[0],S[1],S[2]])) == 1: print(NO)
    else : print(YES)

    return



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    S = next(tokens)  
    solve(S)

if __name__ == '__main__':
    main()

Solution (Python):

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

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

ans = 'No'
if 'A' in s and 'B' in s:
    ans = 'Yes'

print(ans)

Solution (Python):
s = input()

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

Solution (Python):
input_char = input()

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

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

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

Solution (Python):
string = input()
A_flag, B_flag = False, False
for i in string:
  if (i == "A"):
    A_flag = True
  else:
    B_flag = True
if (A_flag and B_flag):
  print("Yes")
else:
  print("No")

Solution (Python):
s = input()

lis = set()
for ss in s:
    lis.add(ss)
if len(lis) == 1:
    print('No')
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):
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**6)


def main():
    a = input()
    ans = 'Yes'
    if a[0] == a[1] == a[2]:
        ans = 'No'
    print(ans)


main()

Solution (Python):
s_1,s_2,s_3=input()
if s_1==s_2==s_3:
  print("No")
else:
  print("Yes")

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

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

Solution (Python):




s = input()

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

Solution (Python):


def main():
    s = input()

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

if __name__ == "__main__":
    main()

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

Solution (Python):


s = input()

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

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

Solution (Python):


l = list(input())
l=set(l)
if len(l)==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):
def main():
    s = input()
    if s == 'AAA' or s == 'BBB':
        print('No')
    else:
        print('Yes')
main()

Solution (Python):


S = str(input())

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

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

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

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

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

Solution (Python):
x,y,z = input()

if x == y and y == z:
  print("No")
else:
  print("Yes")

Solution (Python):
import sys, bisect, math, itertools, string, queue, copy


from collections import Counter,defaultdict,deque
from itertools import permutations, combinations
from heapq import heappop, heappush

sys.setrecursionlimit(10**8)
mod = 10**9+7
def inp(): return int(input())
def inpm(): return map(int,input().split())
def inpl(): return list(map(int, input().split()))
def inpls(): return list(input().split())
def inplm(n): return list(int(input()) for _ in range(n))
def inplL(n): return [list(input()) for _ in range(n)]
def inplT(n): return [tuple(input()) for _ in range(n)]
def inpll(n): return [list(map(int, input().split())) for _ in range(n)]
def inplls(n): return sorted([list(map(int, input().split())) for _ in range(n)])

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

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

Solution (Python):

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

Solution (Python):
s = input()

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

Solution (Python):
S = input()

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

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

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

Solution (Python):
S = input()

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

Solution (Python):
from collections import defaultdict
from collections import deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random


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


def I(): return int(sys.stdin.readline())


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


def S(): return list(sys.stdin.readline())[:-1]


def IR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = I()
    return l

def LIR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = LI()
    return l
def SR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = S()
    return l
def LSR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = LS()
    return l





s = S()

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

Solution (Python):
import collections as c
import sys
input = sys.stdin.readline
ip = lambda : map(int, input().split())
mod = 10**9+7

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

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

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

Solution (Python):
import sys

S = list(sys.stdin.readline().strip())
if len(set(S)) > 1:
    print("Yes")
else:
    print("No")

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

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

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

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

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

Solution (Python):
S = input()

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

Solution (Python):
S = input()

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

Solution (Python):
import itertools
import math
import sys
import heapq
from collections import Counter
from collections import deque
from fractions import gcd
from functools import reduce
sys.setrecursionlimit(4100000)
from functools import lru_cache
INF = 1 << 60


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

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

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

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

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

Solution (Python):





def solv(S):
    if S == 'AAA' or S == 'BBB':
        return 'No'
    return 'Yes'


if __name__ == "__main__":

    S = input()
    ans = solv(S)

    print(ans)

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

Solution (Python):

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



if __name__ == "__main__":
    resolve()

Solution (Python):
S=input()

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

now = S[0]
for i in range(1, 3):
    if now != S[i]:
        print("Yes")
        exit()

print("No")

Solution (Python):

str = input()
char_list = list(str)

if(char_list[0] == char_list[1] == char_list[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()
a = 0
b = 0
for x in s:
    if x == 'A': a += 1
    if x == 'B': b += 1
if a == 0 or b == 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):
import math
import fractions
import bisect
import collections
import itertools
import heapq
import string
import sys
import copy
from collections import deque
sys.setrecursionlimit(10**7)
MOD = 10**9+7
def gcd(a,b):return fractions.gcd(a,b) 
def lcm(a,b):return (a*b) // fractions.gcd(a,b) 
def iin(): return int(input()) 
def ifn(): return float(input()) 
def isn(): return input().split() 
def imn(): return map(int, input().split()) 
def fmn(): return map(float, input().split()) 
def iln(): return list(map(int, input().split())) 
def iln_s(): return sorted(iln()) 
def iln_r(): return sorted(iln(), reverse=True) 
def fln(): return list(map(float, input().split())) 
def join(l, s=''): return s.join(l) 
def perm(l, n): return itertools.permutations(l, n) 
def perm_count(n, r): return math.factorial(n) // math.factorial(n-r) 
def comb(l, n): return itertools.combinations(l, n) 
def comb_count(n, r): return math.factorial(n) // (math.factorial(n-r) * math.factorial(r)) 
def two_distance(a, b, c, d): return ((c-a)**2 + (d-b)**2)**.5 
def m_add(a,b): return (a+b) % MOD

def sieves_of_e(n):
    is_prime = [True] * (n+1)
    is_prime[0] = False
    is_prime[1] = False
    for i in range(2, int(n**0.5)+1):
        if not is_prime[i]: continue
        for j in range(i * 2, n+1, i): is_prime[j] = False
    return is_prime

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

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

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

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

Solution (Python):
S = input()

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

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

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