Problem:
 Score : 100 points    Problem Statement In AtCoder City, there are three stations numbered 1 , 2 , and 3 .  Each of these stations is operated by one of the two railway companies, A and B. A string S of length 3 represents which company operates each station. If S_i is A , Company A operates Station i ; if S_i is B , Company B operates Station i .  To improve the transportation condition, for each pair of a station operated by Company A and one operated by Company B, there will be a bus service connecting them.  Determine if there is a pair of stations that will be connected by a bus service.      Constraints  Each character of S is A or B .  |S| = 3         Input Input is given from Standard Input in the following format:  S       Output If there is a pair of stations that will be connected by a bus service, print Yes ; otherwise, print No .        Sample Input 1 ABA      Sample Output 1 Yes  Company A operates Station 1 and 3 , while Company B operates Station 2 .  There will be a bus service between Station 1 and 2 , and between Station 2 and 3 , so print Yes .       Sample Input 2 BBA      Sample Output 2 Yes  Company B operates Station 1 and 2 , while Company A operates Station 3 .  There will be a bus service between Station 1 and 3 , and between Station 2 and 3 , so print Yes .       Sample Input 3 BBB      Sample Output 3 No  Company B operates all the stations. Thus, there will be no bus service, so print No .

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

Solution (Python):
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

S = input()

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

Solution (Python):
s = [i for i in input()]
s0 = s[0]
for j in s[1:]:
  if s0 != j:
    print("Yes")
    exit()
  s0 = j
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] or s[0] != s[2] or s[1] != s[2]:
    print("Yes")
else: print("No")

Solution (Python):
x = input()

if x == "AAA" or x == "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()

count = [0,0]

for s in S:
    if s == "A":
        count[0] +=1
    else:
        count[1] += 1

if count[0] > 0 and count[1] > 0:
    print("Yes")

else:
    print("No")

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

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

Solution (Python):

"""
Created on Sun Apr 12 20:07:56 2020

@author: Kanaru Sato
"""

s = list(input())

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

Solution (Python):
from sys import stdin

s = stdin.readline().rstrip()

count = 0
if s[0] == 'A':
    if s[1] == 'B':
        count += 1
if s[1] == 'A':
    if s[2] == 'B':
        count += 1
if s[0] == 'B':
    if s[1] == 'A':
        count += 1
if s[1] == 'B':
    if s[2] == 'A':
        count += 1
if count > 0:
    print('Yes')
else:
    print('No')

Solution (Python):
S=list(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()
dict_st = {'A':0, 'B':0}
for i in S:
  dict_st[i]+=1

for k,v in dict_st.items():
  if v<=2 and v>0:
    print('Yes')
    break
  elif v>2:
    print('No')
    break

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

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

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

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

Solution (Python):
x = input()
print(["Yes","No"][(x == "AAA") | (x == "BBB")])

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

Solution (Python):
S = input()
A = False
B = False

for s in S:
  if s == "A":
    A = True
  else:
    B = True

if A == True and B == True:
  print("Yes")
else:
  print("No")

Solution (Python):
S = input()

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

Solution (Python):
S = input()

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

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

Solution (Python):
s = input()

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

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

Solution (Python):
S=input()

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

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

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

Solution (Python):
import sys
import os
import math

ii = lambda: int(sys.stdin.buffer.readline().rstrip())
il = lambda: list(map(int, sys.stdin.buffer.readline().split()))
fl = lambda: list(map(float, sys.stdin.buffer.readline().split()))
iln = lambda n: [int(sys.stdin.buffer.readline().rstrip()) for _ in range(n)]

iss = lambda: sys.stdin.buffer.readline().decode().rstrip()
sl = lambda: list(map(str, sys.stdin.buffer.readline().decode().split()))
isn = lambda n: [sys.stdin.buffer.readline().decode().rstrip() for _ in range(n)]

MOD = 10 ** 9 + 7


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

    l = list(iss())
    print('Yes' if len(set(l)) == 2 else 'No')


if __name__ == '__main__':
    main()

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

Solution (Python):
s = input()

ans = 'Yes'

if (s[0] == s[1] == s[2]):
    ans = 'No'

print(ans)

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

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

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

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

Solution (Python):
a,b,c = list(input())
print("No") if a==b and b==c and c==a 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')

main()

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

Solution (Python):


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

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

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

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

Solution (Python):
s = input()
x = s.count('A') ; y = s.count('B')
if (x == 1 and y == 2) or (x == 2 and y == 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] == S[1] == S[2] : 
    print("No")
else : 
    print("Yes")

Solution (Python):
x = input()

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

Solution (Python):
a = list(input())
if a[0] == a[1] == a[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):
string = sorted(input())
print("Yes" if string[0] != string[2] else "No")

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

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

Solution (Python):


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

is_bus_need = lambda S: (S != 'AAA') and (S != 'BBB')

answer = 'Yes' if is_bus_need(S) else 'No'

print(answer)

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

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

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

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

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

s.sort()

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

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

Solution (Python):
S =input() 

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

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

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

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

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

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

Solution (Python):
import sys


def solve():
    readline = sys.stdin.buffer.readline
    mod = 10 ** 9 + 7
    s = list(str(readline().rstrip().decode('utf-8')))
    for i in range(1, len(s)):
        if s[i] != s[i-1]:
            print("Yes")
            exit()
    print("No")


if __name__ == '__main__':
    solve()

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

Solution (Python):
S=input()

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

Solution (Python):
s = input()

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

Solution (Python):
S = input()

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

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

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

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 S[0] == S[1] and S[0] == 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()

c0 = None
for c in S:
    if c0 is None:
        c0 = c
        continue
    
    if c != c0:
        c0 = None
        break
    
result = "Yes" if c0 is None else "No"
print(result)

Solution (Python):
numB=input().count("B")
print("No" if numB==3 or numB==0 else "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[0]!=S[1] or S[1]!=S[2]:
    print("Yes")
else:
    print("No")

Solution (Python):
s = input()

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

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

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

Solution (Python):
station = list(input())
message = ""

for i in range(0, len(station)-1):
    if (station[i] != station[i + 1]):
        message = 'Yes'
        break
    else:
        message = 'No'


print(message)

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

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

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

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

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

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

if K[0]==K[1] and K[1] == K[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()

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

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

Solution (Python):
a = input()

if a[0] == a[1] and a[0] == a[2] and a[1] == a[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()

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

print("No")

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

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

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

if all(i == "A" for i in S) or all(i == "B" for i in S):
    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()
ans = 'No'
if S[0] != S[1]:
    ans = 'Yes'
elif S[1] != S[2]:
    ans = 'Yes'
print(ans)

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

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

Solution (Python):
S=input()

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

Solution (Python):

import copy
import random
import bisect 
import fractions 
import math
import sys
import collections

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

d = collections.deque()
def LI(): return list(map(int, sys.stdin.readline().split()))

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

Solution (Python):
s = input()
count = 0
for i in range(3):
    if s[i] == 'A':
        count += 1
if count == 0 or count == 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 = list(input())
if 'A' in s and 'B' in s:
    print('Yes')
    exit()

print('No')

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

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

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

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

Solution (Python):
s=raw_input()
if s[0]==s[1] and s[0]!=s[2]:
  print "Yes"
elif s[0]==s[2] and s[0]!=s[1]:
  print "Yes"
elif s[1]==s[2] and s[1]!=s[0]:
  print "Yes"
elif s[1]==s[0] and s[1]!= s[2]:
  print "Yes"
elif s[2]==s[0] and s[2]!= s[1]:
  print "Yes"
elif s[2]==s[1] and s[2]!= s[0]:
  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 == 'AAA' or s == 'BBB':
    print('No')
else:
    print('Yes')

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

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

Solution (Python):
import sys

if __name__ == "__main__":
    S = input()

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

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

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

Solution (Python):
S = input()

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

Solution (Python):
S = input()

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

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

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

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

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

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

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

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

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

Solution (Python):
S = input()

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

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

Solution (Python):
station = input()

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

Solution (Python):
a, b, c = input()

if a == b == c:
    print("No")
else:
    print("Yes")

Solution (Python):
n=input()
a=0
for i in n:
    if i=="A":
        a+=1
if a%3!=0:
    print('Yes')
else:
    print('No')

Solution (Python):
S = input()

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

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

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

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

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

Solution (Python):

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

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

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

    print(ans)


if __name__ == "__main__":
    main()

Solution (Python):

s = input()

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

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

bool1 = S[0] == S[1]
bool2 = S[1] == S[2]
bool3 = S[2] == S[0]

if bool1*bool2*bool3:
  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.count('A')>=1 and s.count('B')>=1):
    print("Yes")
else:
    print("No")

Solution (Python):
S = input()

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

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

Solution (Python):
import sys

X = sys.stdin.readline().rstrip()
if len(set(X)) > 1:
    print('Yes')
else:
    print('No')

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

Solution (Python):
S = input()

if S[0] == S[1] == S[2] == "A" or S[0] == S[1] == 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):
station = []
station = list(input())

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

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

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

Solution (Python):
s = input().rstrip()
if s[0] == s[1] == 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 = list(input())
s.append(s[0])
ans = False
for i in range(len(s)-1):
    if s[i] != s[i+1]:
        ans = True
if ans:
    print('Yes')
else:
    print('No')

Solution (Python):
from collections import deque
from collections import Counter
from itertools import product, permutations,combinations
from operator import itemgetter
from heapq import heappop, heappush
from bisect import bisect_left, bisect_right, bisect




from fractions import gcd
from math import ceil,floor, sqrt, cos, sin, pi, factorial
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10**8)
INF = float('inf')

def main():
  s = input()
  if len(set(s)) == 2:
    print('Yes')
  else:
    print('No')
  
  
if __name__ == '__main__':
  main()

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

Solution (Python):
print(' YNeos'['AAA'!=input()!='BBB'::2])

Solution (Python):
S = input()
 
if S == "AAA":
    print("No")
elif 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 = str(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):
from bisect import bisect_left as bl
from bisect import bisect_right as br
from heapq import heappush,heappop
import math
from collections import *
from functools import reduce,cmp_to_key
import sys
input = sys.stdin.readline

M = mod = 998244353
def factors(n):return sorted(set(reduce(list.__add__, ([i, n//i] for i in range(1, int(n**0.5) + 1) if n % i == 0))))
def inv_mod(n):return pow(n, mod - 2, mod)

def li():return [int(i) for i in input().rstrip('\n').split()]
def st():return input().rstrip('\n')
def val():return int(input().rstrip('\n'))
def li2():return [i for i in input().rstrip('\n')]
def li3():return [int(i) for i in input().rstrip('\n')]

print('Yes' if len(Counter(st())) > 1 else 'No')

Solution (Python):
if not len(set(input()))==1:
  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())

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

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

Solution (Python):
import numpy as np
S= str(input())
a='Yes'
b='No'
if S[0] is  S[1] and S[1] is S[2]:
    print(b)
else:
    print(a)

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

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

Solution (Python):
import itertools
import fractions
def main():
  s = input()
  if s.count('A') == 3 or s.count('B') == 3:
    print('No')
  else:
    print('Yes')
  
if __name__ == '__main__':
  main()

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

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

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

Solution (Python):
S = list(input())
for i in range(len(S)):
  if (i == (len(S) - 1)):
    break
  if ( 'A' in (S[i] + S[i + 1]) and 'B' in (S[i] + S[i + 1]) ):
    print("Yes")
    exit()
print("No")

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

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

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

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

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

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

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

Solution (Python):

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

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

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

Solution (Python):
s = input()

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

Solution (Python):
a=input()
num=1
for i in range(len(a)-1):
    if a[i]==a[i+1]:
        num+=1
if num==len(a):
    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[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 = list(input())
if len(set(s)) == 1:
    print("No")
else:
    print("Yes")

Solution (Python):
import sys

s = sys.stdin.readline().rstrip()

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

if __name__ ==  '__main__':
    main()

Solution (Python):
S = input()
print('No' if S == 'AAA' or S == 'BBB' else '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()
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):
n = list(set(e for e in input()))
print("Yes" if "A" in n and "B" in n else "No")

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

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

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

Solution (Python):
def solve(string):
    return "No" if string in ["AAA", "BBB"] else "Yes"


if __name__ == '__main__':
    import sys
    print(solve(sys.stdin.read().strip()))

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

Solution (Python):
S = input().strip()
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.count("A") == 3 or s.count("B") == 3:
    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):
s=input()
if(s[0]==s[1] and s[1]==s[2] and s[2]==s[0]):
  print("No")
else:
  print("Yes")

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

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

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

Solution (Python):
S = str(input())
flag = 0
for i in range(len(S)-1):
    if S[i]!=S[i+1]:
        flag = 1
if flag == 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" or s == "BBB":
  print("No")
else:
  print("Yes")