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
import math
from bisect import bisect_left
from bisect import bisect_right
import collections
import copy
import heapq
from collections import defaultdict
from heapq import heappop, heappush
import itertools
input = sys.stdin.readline

























def inputInt(): return int(input())
def inputMap(): return map(int, input().split())
def inputList(): return list(map(int, input().split()))

inf = float('inf')
mod = 1000000007




def main():
	S = input()
	S = S[:-1]

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

	








def combination(n, r, mod=10**9+7):
    r = min(r, n-r)
    res = 1
    for i in range(r):
        res = res * (n - i) * modinv(i+1, mod) % mod
    return res


def modinv(a, mod=10**9+7):
    return pow(a, mod-2, mod)

def egcd(a, b):
    if a == 0:
        return b, 0, 1
    else:
        g, y, x = egcd(b % a, a)
        return g, x - (b // a) * y, y



def H(n, r, mod=10**9+7):
	
	
    return combination(n+r-1, r, mod)

class Combination:
    """
    O(n)の前計算を1回行うことで，O(1)でnCr mod mを求められる
    n_max = 10**6のとき前処理は約950ms (PyPyなら約340ms, 10**7で約1800ms)
    使用例：
    comb = Combination(1000000)
    print(comb(5, 3))  
    """
    def __init__(self, n_max, mod=10**9+7):
        self.mod = mod
        self.modinv = self.make_modinv_list(n_max)
        self.fac, self.facinv = self.make_factorial_list(n_max)

    def __call__(self, n, r):
        return self.fac[n] * self.facinv[r] % self.mod * self.facinv[n-r] % self.mod

    def make_factorial_list(self, n):
        
        
        fac = [1]
        facinv = [1]
        for i in range(1, n+1):
            fac.append(fac[i-1] * i % self.mod)
            facinv.append(facinv[i-1] * self.modinv[i] % self.mod)
        return fac, facinv

    def make_modinv_list(self, n):
        
        modinv = [0] * (n+1)
        modinv[1] = 1
        for i in range(2, n+1):
            modinv[i] = self.mod - self.mod//i * modinv[self.mod%i] % self.mod
        return modinv

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

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

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

Solution (Python):
s = list(input())
flaga = 0
flagb = 0
for i in range(len(s)):
    if s[i] == "A":
        flaga = 1
    if s[i] == "B":
        flagb = 1

if flaga == 1 and flagb == 1:
    print("Yes")
else:
    print("No")

Solution (Python):
s = input()

if s == 'A' *3 or s == 'B' * 3:
  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') > 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 = input()
if all(i == "A" for i in s):
    print("No")
elif all(i == "B" for i in s):
    print("No")
else:
    print("Yes")

Solution (Python):

s = input()

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

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

Solution (Python):



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

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

Solution (Python):
S = input()

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

Solution (Python):
import sys
sys.setrecursionlimit(1000000000)
import math
from fractions import gcd
def lcm(a, b): return a * b // gcd(a, b)
from itertools import count, permutations
from functools import lru_cache
from collections import deque, defaultdict
from pprint import pprint
ii = lambda: int(input())
mis = lambda: map(int, input().split())
lmis = lambda: list(mis())
INF = float('inf')
N1097 = 10**9 + 7

def meg(f, ok, ng):
    while abs(ok-ng)>1:
        mid = (ok+ng)//2
        if f(mid):
            ok=mid
        else:
            ng=mid
    return ok

def get_inv(n, modp):
    return pow(n, modp-2, modp)

def factorials_list(n, modp):    
    fs = [1]
    for i in range(1, n+1):
        fs.append(fs[-1] * i % modp)
    return fs

def invs_list(n, fs, modp):     
    invs = [get_inv(fs[-1], modp)]
    for i in range(n, 1-1, -1):
        invs.append(invs[-1] * i % modp)
    invs.reverse()
    return invs

def comb(n, k, modp):
    num = 1
    for i in range(n, n-k, -1):
        num = num * i % modp
    den = 1
    for i in range(2, k+1):
        den = den * i % modp
    return num * get_inv(den, modp) % modp

def comb_from_list(n, k, modp, fs, invs):   
    return fs[n] * invs[n-k] * invs[k] % modp



class UnionFindEx:
    def __init__(self, size):
        
        self.roots = [-1] * size
    def getRootID(self, i):
        r = self.roots[i]
        if r < 0:   
            return i
        else:
            r = self.getRootID(r)
            self.roots[i] = r
            return r
    def getGroupSize(self, i):
        return -self.roots[self.getRootID(i)]
    def connect(self, i, j):
        r1, r2 = self.getRootID(i), self.getRootID(j)
        if r1 == r2:
            return False
        if self.getGroupSize(r1) < self.getGroupSize(r2):
            r1, r2 = r2, r1
        self.roots[r1] += self.roots[r2]    
        self.roots[r2] = r1
        return True

def main():
    S=input()
    if 'AB' in S or 'BA' in S:
        print('Yes')
    else:
        print('No')

main()

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

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

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

Solution (Python):
import sys


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

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

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

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

Solution (Python):
letter=input()
if "A" not in letter:
  print("No")
elif "B" not in letter:
  print("No")
else:
  print("Yes")

Solution (Python):


s = input()

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

Solution (Python):
s = input()

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

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

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

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

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

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

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

Solution (Python):
from sys import stdin
s = str(stdin.readline().rstrip())



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

Solution (Python):

import sys

YES = "Yes"  
NO = "No"  


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

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

Solution (Python):
s = input()


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

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

Solution (Python):
input = raw_input

s = input()
if "A" in s and "B" in s:
    out = "Yes"
else:
    out = "No"

print(out)

Solution (Python):
s = input()

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

Solution (Python):

S = input()
s = [S[0],S[1],S[2]]

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

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


def LI(): return [int(x) for x in sys.stdin.readline().split()]


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


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



def B():
    return



def C():
    return



def D():
    return



def E():
    return



def F():
    return



if __name__ == "__main__":
    A()

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

Solution (Python):
import heapq
from collections import deque
from enum import Enum
import sys
import math
from _heapq import heappush, heappop

BIG_NUM = 2000000000
MOD = 1000000007
EPS = 0.000000001



s=input()







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

Solution (Python):
S = list(input())
if S.count('A') >= 1 and S.count('B') >= 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=="AAA":
    print("No")
elif s=="BBB":
    print("No")
else:
    print("Yes")

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

Solution (Python):
S = list(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 = str(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 abs(S.count("A") - S.count("B")) == 1:
    print("Yes")
else:
    print("No")

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

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

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

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

Solution (Python):
S=input()
L=[0,0]
for i in range(3):
    if S[i]=="A":
        L[0]+=1
    else:
        L[1]+=1
if max(L)==3:
    print("No")
else:
    print("Yes")

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

Solution (Python):
S = input()

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

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

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

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

Solution (Python):
from itertools import accumulate, permutations, combinations, product, combinations_with_replacement, groupby
from math import sqrt, factorial, log
from bisect import bisect_left, bisect_right
from collections import Counter, defaultdict, deque
from heapq import heappop, heappush, heappushpop
import sys
stdin = sys.stdin
mod = 10**9 + 7

def ns(): return stdin.readline().rstrip()
def ni(): return int(ns())
def na(): return list(map(int, stdin.readline().split()))

s = ns()

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

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

Solution (Python):
from sys import stdin


def main():
    input = lambda: stdin.readline()[:-1]
    S = input()
    if len(set(S)) == 1:
        print('No')
    else:
        print('Yes')



main()

Solution (Python):

import sys

YES = "Yes"  
NO = "No"  


def solve(S: str):
    if len(set(list(S))) == 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):
from collections import defaultdict
from collections import deque
from string import ascii_uppercase
import sys, bisect, math, heapq

stdin = sys.stdin
read_int = lambda : list(map(int,stdin.readline().split()))
read_str = lambda : stdin.readline().rstrip()

S = read_str()

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

if __name__ == "__main__":
    print(solve())

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

Solution (Python):
print('Yes' if len(set(list(input())))==2 else '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()
ans = s.count('A') % 3
if(ans==0):
    print('No')
else:
    print('Yes')

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

Solution (Python):
S = input()

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

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

Solution (Python):
s = input()
prev = s[0]
for si in s:
    if prev != si:
        print("Yes")
        exit()

print("No")

Solution (Python):


S = input()

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

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

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

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

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

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

Solution (Python):

S = input()


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

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

Solution (Python):

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

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"):
  print("No")
elif(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 = set(input())
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()

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

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


if __name__ == '__main__':
    main()

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

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

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

Solution (Python):
S = input()

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

else:
    print('Yes')

Solution (Python):


S = input()

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

Solution (Python):
from collections import Counter

C = Counter(input())

print(["No","Yes"]['A' in C and 'B' in C])

Solution (Python):
S = input()
S = set(S)
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):
import sys
input = lambda: sys.stdin.readline().rstrip()
input_nums = lambda: list(map(int, input().split()))

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

Solution (Python):
s = input()

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

Solution (Python):
import math,itertools,fractions,heapq,collections,bisect,sys,queue,copy

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

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def LS(): return sys.stdin.readline().split()
def S(): return input()

def main():
  s=list(S())
  s=set(s)

  if len(s)==1:
    return 'No'
  return 'Yes'


print(main())

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

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

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

Solution (Python):
from sys import stdin
def main():
    readline=stdin.readline
    s=readline().strip()
    flagA=False
    flagB=False
    for i in range(len(s)):
        if s[i]=="A":
            flagA=True
        else:
            flagB=True
    if flagA and flagB:
        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):
def input_int():
    return map(int, input().split())

def one_int():
    return int(input())

def one_str():
    return input()

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

S=one_str()

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

Solution (Python):
import sys
import math
MAX_INT = int(10e15)
MIN_INT = -MAX_INT
mod = 1000000007
sys.setrecursionlimit(1000000)
def IL(): return list(map(int,input().split()))
def SL(): return input().split()
def I(): return int(sys.stdin.readline())
def S(): return input()

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

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 print('No')

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

Solution (Python):
import sys
import math
import collections


s = input()


if s[0] == s[1]:
    if s[1] == s[2]:
        print("No")
        sys.exit()

print("Yes")

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

S = list(input())

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

print("No")

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

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

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

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

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

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

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









mod = int(1e9+7)
INF = 1<<29

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

if __name__=='__main__':
    main()

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

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

Solution (Python):
s = input()

ss = set(s)

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

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

import math

import logging

logging.basicConfig(level=logging.DEBUG)

logger = logging.getLogger(__name__)


def resolve():
    S = [x for x in sys.stdin.readline().split()][0]  
    
    
    

    
    
    
    

    logger.debug('{}'.format([]))

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


if __name__ == "__main__":
    resolve()




import sys
from io import StringIO
import unittest


class TestClass(unittest.TestCase):
    def assertIO(self, input, output):
        stdout, stdin = sys.stdout, sys.stdin
        sys.stdout, sys.stdin = StringIO(), StringIO(input)
        resolve()
        sys.stdout.seek(0)
        out = sys.stdout.read()[:-1]
        sys.stdout, sys.stdin = stdout, stdin
        self.assertEqual(out, output)

    def test_入力例_1(self):
        input = """ABA"""
        output = """Yes"""
        self.assertIO(input, output)

    def test_入力例_2(self):
        input = """BBA"""
        output = """Yes"""
        self.assertIO(input, output)

    def test_入力例_3(self):
        input = """BBB"""
        output = """No"""
        self.assertIO(input, output)

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

Solution (Python):
import sys
sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))
def resolve():
    S = sr()
    if S == 'AAA' or S == 'BBB':
        print('No')
    else:
        print('Yes')
resolve()

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

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

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

Solution (Python):
import sys
from math import ceil, floor
from collections import deque, Counter, defaultdict
from fractions import gcd
input = lambda: sys.stdin.readline().rstrip()

def eprint(s):
    sys.stderr.write('DEBUG: {}'.format(s))
    return

def main():
    s = input()
    a = False
    b = False
    for i in range(3):
        if s[i] == 'A':
            a = True
        if s[i] == 'B':
            b = True
    if a and b:
        print('Yes')
    else:
        print('No')
    
    return

if __name__ == '__main__':
    main()

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


if __name__ == '__main__':
    solve()

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

Solution (Python):
s = input()

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

Solution (Python):
S=input()
ans=[]
for i in range(3):
    ans.append(S[i])
if len(set(ans))!=1:
    print("Yes")
else:
    print("No")

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

resolve()

Solution (Python):
def solve(s):
    if s == "AAA" or s == "BBB":
        return "No"
    else:
        return "Yes"


def main():
    s = input()
    res = solve(s)
    print(res)


def test():
    assert solve("ABA") == "Yes"
    assert solve("BBA") == "Yes"
    assert solve("BBB") == "No"


if __name__ == "__main__":
    test()
    main()

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

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

if len(set(list(a))) == 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 = list(input().strip())

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

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

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()
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 S[0] == S[1] == S[2] else "Yes")

Solution (Python):
S = input()

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

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

Solution (Python):
s=input()
li=set([i for i in s])
if len(li)==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 "A" in s and "B" in s:
    print("Yes")
else:
    print("No")

Solution (Python):
s = input()

if s.count('AB') >= 1 or s.count('BA') >= 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 in ['AAA', '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 = list(input())
print('Yes' if len(set(s))==2 else 'No')

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

Solution (Python):

S = list(input())

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

else:
    print('No')