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
from collections import *
import heapq
import math
import bisect
from itertools import permutations,accumulate,combinations,product
from fractions import gcd
def input():
    return sys.stdin.readline()[:-1]
def ruiseki(lst):
    return [0]+list(accumulate(lst))
mod=pow(10,9)+7

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 '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('A') == 3 or S.count('B') == 3:
    print('No')
else:
    print('Yes')

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

Solution (Python):
S=input()
print(['No','Yes'][not (S=="AAA" or S=='BBB')])

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

Solution (Python):
s = input()


cnt = 0
for i in range(3):
    if s[i] == "A":
        cnt += 1

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

Solution (Python):
S = input()

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

print(ans)

Solution (Python):
s = input()

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

Solution (Python):

MOD = 10 ** 9 + 7
INFI = 10**10

import math

import itertools



import copy
from functools import lru_cache

def sosuhante(n):
    for k in range(2, int(math.sqrt(n))+1):
        if n% k ==0:
            return False
    return True
def cmb(n, r):
    if n - r < r: r = n - r
    if r == 0: return 1
    if r == 1: return n

    numerator = [n - r + k + 1 for k in range(r)]
    denominator = [k + 1 for k in range(r)]

    for p in range(2,r+1):
        pivot = denominator[p - 1]
        if pivot > 1:
            offset = (n - r) % p
            for k in range(p-1,r,p):
                numerator[k - offset] /= pivot
                denominator[k] /= pivot

    result = 1
    for k in range(r):
        if numerator[k] > 1:
            result *= int(numerator[k])

    return result

def kingaku(a,b,n):
    keta=len(str(n))
    return a*n+b*keta

def my_index(l, x, default=False):
    if x in l:
        return l.index(x)
    else:
        return default






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


if __name__ == "__main__":
    main()

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

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

Solution (Python):



import array
from bisect import *
from collections import *
import fractions
import heapq
from itertools import *
import math
import random
import re
import string
import sys

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):
import sys
sys.setrecursionlimit(10 ** 7)

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

S = input()

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

Solution (Python):
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))

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()
before_c = ""
for c in s:
    if(before_c != "" and before_c != c):
        print("Yes")
        break
    before_c = c
else:
    print("No")

Solution (Python):

import sys

YES = "Yes"  
NO = "No"  


def solve(S: str):
    if S[0] == S[1] == S[2]:
        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):
S = input()

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

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

Solution (Python):

import sys


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

Solution (Python):
import sys
import math
import bisect

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

if __name__ == "__main__":
    main()

Solution (Python):
s = input()

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

Solution (Python):


import sys
 
stdin = sys.stdin
inf = 1 << 60
mod = 1000000007
 
ni = lambda: int(ns())
nin = lambda y: [ni() for _ in range(y)]
na = lambda: list(map(int, stdin.readline().split()))
nan = lambda y: [na() for _ in range(y)]
nf = lambda: float(ns())
nfn = lambda y: [nf() for _ in range(y)]
nfa = lambda: list(map(float, stdin.readline().split()))
nfan = lambda y: [nfa() for _ in range(y)]
ns = lambda: stdin.readline().rstrip()
nsn = lambda y: [ns() for _ in range(y)]
ncl = lambda y: [list(ns()) for _ in range(y)]
nas = lambda: stdin.readline().split()

s = ns()
ans = "No"
for i in range(len(s) - 1):
    if s[i] != s[i + 1]:
        ans = "Yes"

print(ans)

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

Solution (Python):
stations = input()
if stations == 'AAA' or stations == '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()

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

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

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

Solution (Python):
s = input()

if s == "AAA" or s == "BBB":
    ans = "No"
else:
    ans = "Yes"

print(ans)

Solution (Python):
import sys
input = sys.stdin.readline
S = list(input())[: -1]
if S.count("A") % 3: print("Yes")
else: print("No")

Solution (Python):
S = input()

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

Solution (Python):



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

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

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

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

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

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

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

Solution (Python):
def main():
    S = input()
    ans = "No"
    for i in range(2):
        if (S[i] != S[i+1]):
            ans = "Yes"
    print(ans)


if __name__ == '__main__':
    main()

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()
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()
s = set(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):
S = input()
k = []
for i in range(len(S)):
    k.append(S[i])
p = set(k)
L = list(p)
if len(L) == 1:
    print("No")
else:
    print("Yes")

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

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

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

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

Solution (Python):
S = input()

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

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

Solution (Python):
S = input()

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

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

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

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

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

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

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

Solution (Python):
from collections import Counter,defaultdict,deque
from bisect import bisect_left
import sys,math,itertools,pprint,fractions,time
sys.setrecursionlimit(10**8)
mod = 10**9+7
INF = float('inf')
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))

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

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

Solution (Python):




def solve(inp):
    S = inp.readline().strip()

    if S[0] == S[1] == S[2]:
        return "No"
    else:
        return "Yes"


def main():
    import sys
    result = solve(sys.stdin)
    if result is not None and result != '':
        print(result)


if __name__ == '__main__':
    main()

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

Solution (Python):
import sys

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

Solution (Python):
import math
from functools import reduce
from collections import deque
import sys
sys.setrecursionlimit(10**7)


def get_nums_l():
    return [ int(s) for s in input().split(" ")]


def get_nums_n(n):
    return [ int(input()) for _ in range(n)]


def get_all_int():
    return map(int, open(0).read().split())

def log(*args):
    print("DEBUG:", *args, file=sys.stderr)

s = input()

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

Solution (Python):



def main():
    import sys
    input = sys.stdin.readline
    sys.setrecursionlimit(10**6)
    

    def dump(*args):
        sys.stderr.write(str(args))

    s = input()[:-1]
    if (len(set(s)) == 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):
ans = 0
s = input()
for i in range(1, len(s)):
    if s[i] != s[i - 1]:
        ans += 1
if ans:
    print("Yes")
else:
    print("No")

Solution (Python):
s = input().rstrip()
if len(set(list(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()[:-1]


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


if __name__ == "__main__":
    main()

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()
if len(set(list(S))) == 1:
    print("No")
    exit()

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

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

Solution (Python):

import sys
input = sys.stdin.readline

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

Solution (Python):

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

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

Solution (Python):
S = input()

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

Solution (Python):
def main():

    S = input()
    if 'A' in S and 'B' in S:
        return "Yes"
    return "No"


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

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

Solution (Python):
s = input()

if s.count(s[0]) == 3:
    print("No")
else:
    print("Yes")

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

Solution (Python):
s=input()
if 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 '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):
rr = raw_input
rri = lambda: int(rr())
rrm = lambda: map(int, rr().split())

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

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

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

Solution (Python):
S=input()

if '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):
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()  

s = ns()

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

Solution (Python):











import sys
sys.setrecursionlimit(10**6)
input=sys.stdin.readline
from math import floor,sqrt,factorial,hypot,log 
from heapq import heappop, heappush, heappushpop
from collections import Counter,defaultdict,deque
from itertools import accumulate,permutations,combinations,product,combinations_with_replacement
from bisect import bisect_left,bisect_right
from copy import deepcopy
from fractions import gcd
from random import randint
def ceil(a,b): return (a+b-1)//b
inf=float('inf')
mod = 10**9+7
def pprint(*A): 
    for a in A:     print(*a,sep='\n')
def INT_(n): return int(n)-1
def MI(): return map(int,input().split())
def MF(): return map(float, input().split())
def MI_(): return map(INT_,input().split())
def LI(): return list(MI())
def LI_(): return [int(x) - 1 for x in input().split()]
def LF(): return list(MF())
def LIN(n:int): return [I() for _ in range(n)]
def LLIN(n: int): return [LI() for _ in range(n)]
def LLIN_(n: int): return [LI_() for _ in range(n)]
def LLI(): return [list(map(int, l.split() )) for l in input()]
def I(): return int(input())
def F(): return float(input())
def ST(): return input().replace('\n', '')
def main():
    S=ST()
    if("B" in S and "A" in S):
        print("Yes")
    else:
        print("No")
if __name__ == '__main__':
    main()

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

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

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


if __name__ == '__main__':
    main()

Solution (Python):



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

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

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


if __name__ == '__main__':
    main()

Solution (Python):
def inp():
    return input()
def iinp():
    return int(input())
def inps():
    return input().split()
def miinps():
    return map(int,input().split())
def linps():
    return list(input().split())
def lmiinps():
    return list(map(int,input().split()))
def lmiinpsf(n):
    return [list(map(int,input().split()))for _ in range(n)]

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

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

Solution (Python):
import sys
sys.setrecursionlimit(10**6)
from math import floor,ceil,sqrt,factorial,log
from heapq import heappop, heappush, heappushpop
from collections import Counter,defaultdict,deque
from itertools import accumulate,permutations,combinations,product,combinations_with_replacement
from bisect import bisect_left,bisect_right
from copy import deepcopy
from operator import itemgetter
from fractions import gcd
mod = 10 ** 9 + 7
inf = float('inf')
ninf = -float('inf')
 

def ii(): return int(sys.stdin.readline().rstrip()) 
def mii(): return map(int,sys.stdin.readline().rstrip().split())
def limii(): return list(mii()) 
def lin(n:int): return [ii() for _ in range(n)]
def llint(n: int): return [limii() for _ in range(n)]

def ss(): return sys.stdin.readline().rstrip() 
def mss(): return sys.stdin.readline().rstrip().split()
def limss(): return list(mss()) 
def lst(n:int): return [ss() for _ in range(n)]
def llstr(n: int): return [limss() for _ in range(n)]





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

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

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


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 "A" not in S or "B" not in S:
    print("No")
else:
    print("Yes")

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

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

print(main())

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

Solution (Python):
def main():
    import numpy as np
    import sys
    S=sys.stdin.readline()
    if 'A' in S and 'B' in S:
        print('Yes')
    else:
        print('No')



main()

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

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

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

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

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

Solution (Python):
import sys

sys.setrecursionlimit(10 ** 8)

input = sys.stdin.readline


def main():
    S = input().strip()

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


if __name__ == '__main__':
    main()

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

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

Solution (Python):
s = input()
if len(set(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 = 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):
import math
import itertools
import fractions
import heapq
import collections
import bisect
import sys
import copy

sys.setrecursionlimit(10**9)
mod = 10**7+9
inf = 10**20


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

Solution (Python):
import copy

import math
import fractions

def j(n):
    if n:print("Yes")
    else:print("No")
    exit(0)
rem = 10 ** 9 + 7

"""
def ct(x,y):
    if (x>y):print("+")
    elif (x<y): print("-")
    else: print("?")
"""

def ip():
    return int(input())
def iprow():
    return [int(i) for i in input().split()]
def ips():
    return (int(i) for i in input().split())
def ipmultiplerow(n):
    a = []
    for i in range(n):
        a.append(ip())
    return a
def printrow(a):
    for i in a:
        print(i)

def lcm(x, y):
    return (x * y) // fractions.gcd(x, y)

a = input()

if a[0] == a[1] and a[1] == a[2]:
    j(0)
j(1)

Solution (Python):

from collections import defaultdict,deque
from heapq import heappush, heappop
from itertools import permutations
import sys
import math
import bisect
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def LS():return [list(x) for x in sys.stdin.readline().split()]
def S():
    res = list(sys.stdin.readline())
    if res[-1] == "\n":
        return res[:-1]
    return res
def IR(n):
    return [I() for i in range(n)]
def LIR(n):
    return [LI() for i in range(n)]
def SR(n):
    return [S() for i in range(n)]
def LSR(n):
    return [LS() for i in range(n)]

sys.setrecursionlimit(1000000)
mod = 1000000007

def solve():
    s = input()
    if s.count("A") in [0,3]:
        print("No")
    else:
        print("Yes")
    return


if __name__ == "__main__":
    solve()

Solution (Python):
import sys
import math
from collections import defaultdict

sys.setrecursionlimit(10**7)
def input():
    return sys.stdin.readline()[:-1]

mod = 10**9 + 7

def I(): return int(input())
def LI(): return list(map(int, input().split()))
def LIR(row,col):
    if row <= 0:
        return [[] for _ in range(col)]
    elif col == 1:
        return [I() for _ in range(row)]
    else:
        read_all = [LI() for _ in range(row)]
        return map(list, zip(*read_all))



S = str(input())

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

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

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

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

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

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

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

Solution (Python):

import sys
sys.setrecursionlimit(10**9)
INF=10**18
MOD=10**9+7
def input(): return sys.stdin.readline().rstrip()

def main():
    S=list(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):
s = input()

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

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

Solution (Python):





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

Solution (Python):


import sys
sys.setrecursionlimit(300000)

YES = "Yes"  
NO = "No"  

def solve(S: str):
    s = set(S)
    if len(s) > 1:
        ret = YES
    else:
        ret = NO
    print(ret)
    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):
S=input()
print("YNeos"[not(S[0]!=S[1] or S[1]!=S[2])::2])

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

Solution (Python):
import bisect
import cmath
import heapq
import itertools
import math
import operator
import os
import random
import re
import string
import sys
from collections import Counter, deque, defaultdict
from copy import deepcopy
from decimal import Decimal
from fractions import gcd
from functools import lru_cache, reduce
from operator import itemgetter, mul, add, xor

import numpy as np

if os.getenv("LOCAL"):
    sys.stdin = open("_in.txt", "r")

sys.setrecursionlimit(10 ** 9)
INF = float("inf")
IINF = 10 ** 18
MOD = 10 ** 9 + 7



S = sys.stdin.buffer.readline().decode().rstrip()
ok = len(Counter(list(S))) == 2
if ok:
    print('Yes')
else:
    print('No')

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