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.



Sample input:
ABA


Sample output:
Yes

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s1, s2, s3 = input()
count = 0
if s1 != s2:
    count += 1
if s2 != s3:
    count += 1
if s1 != s3:
    count += 1
if count == 0:
    print('No')
else:
    print('Yes')

Submission status: Accepted

Solution code:
#!/usr/bin/env python
# -*- coding: utf-8 -*-

s=input()

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

Submission status: Accepted

Solution code:
S = input()
print(['No','Yes'][S.find("B") != -1 and S.find("A") != -1])

Submission status: Accepted

Solution code:
#ABC158
#A

S = input()

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

Submission status: Accepted

Solution code:

def main():
    S = input()

    flag = False
    for i in range(2):
        tmp = S[i]
        if tmp != S[i+1]:
            flag = True
    if flag : print("Yes")
    else: print("No")

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
# coding: utf-8
# import re

S = input()
# print(S)

# if len(re.findall(("AB"or"BA"), S))>0:
#     print('Yes')
# else:
#     print('No')

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

Submission status: Accepted

Solution code:
S = str(input())

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

Submission status: Accepted

Solution code:
i=input()
j=i[0]
k=0

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
InpStr=str(input())
result='Yes'
# 処理
if InpStr[0]=='A' and InpStr[1]=='A' and InpStr[2]=='A':
    result='No'

if InpStr[0]=='B' and InpStr[1]=='B' and InpStr[2]=='B':
    result='No'

print(result)

Submission status: Accepted

Solution code:
# To add a new cell, type '# %%'
# To add a new markdown cell, type '# %% [markdown]'

# %%
lst = input().split()

# %%
one = lst[0][0]
two = lst[0][1]
three = lst[0][2]


# %%
one_two = one != two
two_three = two != three
three_one = three != one


# %%
any([one_two, two_three, three_one])


# %%
if any([one_two, two_three, three_one]):
    print('Yes')
else:
    print('No')


# %%

Submission status: Accepted

Solution code:
S=input()
a=1
if S[0] == 'A':
    if S[1] == 'A':
        if S[2] == 'A':
            a = 0
if S[0] == 'B':
    if S[1] == 'B':
        if S[2] == 'B':
            a = 0

if a == 0:
    print('No')
else:
    print('Yes')

Submission status: Accepted

Solution code:
s = input()

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

Submission status: Accepted

Solution code:
A = "AAA"
B = "BBB"
S = input()
if A in S or B in S:
    print("No")
else:
    print("Yes")

Submission status: Accepted

Solution code:
S = input() 

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
char = input()
bool1 = "AB" in char
bool2 = "BA" in char

if bool1 or bool2:
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
s = str(input())
if s.count('A') == 1:
    print("Yes")
elif s.count('A') == 2:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()
if S.__contains__("A") and S.__contains__("B"):
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = set(input())
if len(S) == 2:
    print('Yes')
elif len(S) == 1:
    print('No')

Submission status: Accepted

Solution code:
S = input()
A,B = 0,0
for s in S:
    if s == 'A':
        A += 1
    else:
        B += 1

if A != 0 and B != 0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
a,b,c=input()
# print(a,b,c)
List = []
List.append(a)
List.append(b)
List.append(c)
# print(List)
for i in range(0,2):
    if List[i] != List[i + 1]:
        print('Yes')
        exit()

print('No')

Submission status: Accepted

Solution code:
s = list(input())
if (s == ['A', 'A', 'A']) or (s == ['B', 'B', 'B']):
    print('No')
else:
    print('Yes')

Submission status: Accepted

Solution code:
s = input()

ss = s[0]

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()

zikkou= [0,2]

isto = True

for n in zikkou:
    if S.count("A") == 3 or S.count("B") == 3:
        isto = False


if isto:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
S = str(input())
print( "No\n" if (ord(S[0]) + ord(S[1]) + ord(S[2]) == ord(S[0])*3) else "Yes\n")

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline

s = input()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s=str(input())
l=[]
for i in range(3):
  l.append(s[i])
if len(set(l))==1:
  print('No')
else:
  print('Yes')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a=input()
len=len(a)
a_cnt=0
b_cnt=0
for i in range(len):
    if a[i]=='A':
        a_cnt+=1
    else :
        b_cnt+=1
if a_cnt>0 and b_cnt>0:
    print('Yes')
else :
    print('No')

Submission status: Accepted

Solution code:
bus = input()
if bus == ("AAA"):
  print ("No")
elif bus == ("BBB"):
  print ("No")
else:
  print ("Yes")

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
s=input()
l=list(s)
if len(set(l))==1:
    print("No")
else:
    print("Yes")

Submission status: Accepted

Solution code:
input_line = input()

if input_line == 'ABB' or input_line == 'BAB' or input_line == 'BBA' or input_line == 'BAA' or input_line == 'ABA' or input_line == 'AAB':
  print('Yes')
else:
  print('No')

Submission status: Accepted

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

print(Ans)

Submission status: Accepted

Solution code:
s = str(input())
a = 0
for i in s:
  if i == "A":
    a += 1
  elif i == "B":
    a -= 1
if a == 3 or a == -3:
  print("No")
else:
  print("Yes")

Submission status: Accepted

Solution code:
s =str(input())
if "A" not in s or "B" not in s:
  print("No")
else:
  print("Yes")

Submission status: Accepted

Solution code:
import sys
readline = sys.stdin.buffer.readline

s = readline().rstrip().decode('utf-8')

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

Submission status: Accepted

Solution code:
import math
import sys


S = input()

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

Submission status: Accepted

Solution code:
def map_all(es):
    return all([e == es[0] for e in es[1:]]) if es else False

a =input()
aa = list(a)

if map_all(aa):
  print('No')
else:
  print('Yes')

Submission status: Accepted

Solution code:
station = input()
a = False
b = False
for i in station:
    if i == 'A':
        a = True
    if i == 'B':
        b = True

if a and b:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
S = list(input())
now = S[0]
ans = False
for i in range(1,len(S),1):
    if S[i] != now :
        ans = True
if ans :
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
bus = input()
kazu_a = bus.count('A')

if kazu_a == 3:
    answer = 'No'
elif kazu_a == 0:
    answer = 'No'
else:
    answer = 'Yes'

print(answer)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# inputs = list(map(int, (input().split())))

a = input()

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

Submission status: Accepted

Solution code:
S = input()

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

Submission status: Accepted

Solution code:
import argparse

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

if __name__ == "__main__":
    s = input()
    print(main(s))

Submission status: Accepted

Solution code:
def Main(S):
    return 'No' if S == 'AAA' or S == 'BBB' else 'Yes'

def main():
    S = str(input())
    print(Main(S))

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
stdin = input()
s = stdin

result = "Yes" if "A" in s and "B" in s else "No"

print(result)

Submission status: Accepted

Solution code:
S=input()
a=[]
b=[]
for i in range(3):
  if S[i]=="A":
    a+=[S[i]]
  else:
    b+=["B"]
if len(a)==3 or len(b)==3:
  print("No")
else:
  print("Yes")

Submission status: Accepted

Solution code:
abc=str(input())
a=abc[0]
b=abc[1]
c=abc[2]



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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

import collections


class Solution:
    def solve(self, string):
        counts = collections.Counter(string)

        return counts["A"] and counts["B"]


sol = Solution()

string = input().strip()

print("Yes" if sol.solve(string) else "No")

Submission status: Accepted

Solution code:
#for _ in range(int(input())):
s=input()
if(s=="AAA" or s=="BBB"):
    print("No")
else:
    print("Yes")

Submission status: Accepted

Solution code:
p, q, r = list(input())
if p == q == r :
    print("No")
else:
    print("Yes")

Submission status: Accepted

Solution code:
S = input()

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

Submission status: Accepted

Solution code:
s = input()

a = False
for i in range(len(s)):
    if s[i] == "A":
        a = True
        break

b = False
for i in range(len(s)):
    if s[i] == "B":
        b = True
        break

if a and b:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
s = input()
a = int(s.count("A"))
b = int(s.count("B"))

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

else:
    print("Yes")

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
sys.setrecursionlimit(10000000)
INF = 1<<32

YES = "Yes"  # type: str
NO = "No"  # type: str

def solve(S: str):
    if S.count('A') == 3 or S.count('B') == 3:
        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)  # type: str
    solve(S)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
s = input()
cnt = 0
for i in range(1, len(s)):
    if s[i] != s[i-1]:
        cnt += 1

if cnt == 0:
    print('No')
else:
    print('Yes')

Submission status: Accepted

Solution code:
S = input()
s = {}

for i in S:
    s[i] = 1

if len(s.keys()) > 1:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
s = input()
for i in range(2):
	if s[i] != s[i+1]:
		print("Yes")
		exit()
print("No")

Submission status: Accepted

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

Submission status: Accepted

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

    if S[0] == S[1] and S[0] == S[2]:

        print("No")
    else :
        print("Yes")


main()

Submission status: Accepted

Solution code:
inp = input()
if inp == "AAA" or inp == "BBB":
    print("No")
else:
    print("Yes")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def resolve():
    s = input()
    c = set()

    for cha in s:
        c.add(cha)

    if len(c) == 1:
        print('No')

    else:
        print('Yes')

resolve()

Submission status: Accepted

Solution code:
import sys

input = sys.stdin.readline

S = input().strip()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = list(input())
s_A = [s for s in S if 'A' in s]
s_B = [s for s in S if 'B' in s]

if len(s_A) == 3 or len(s_B) == 3:
    ans = 'No'
else:
    ans = 'Yes'

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()
d = {"A":0,"B":0}
for i in s:
	d[i] += 1
if (d["A"] == 2 and d["B"] == 1) or (d["A"] == 1 and d["B"] == 2):
	print("Yes")
else:
	print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def a(s):
 
    return "Yes" if s.count("A") != 0 and s.count("B") != 0 else "No"
 
 
def main():
    s = str(input())
    print(a(s))
 
if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()

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

Submission status: Accepted

Solution code:
S = input()
flag = 0
for i in range(2):
	if S[i] == S[i+1]:
		pass
	else:
		flag = flag +1

if flag >= 1:
	print("Yes")
else:
	print("No")

Submission status: Accepted

Solution code:
S = set(list(input()))

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

Submission status: Accepted

Solution code:
s = input()

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

Submission status: Accepted

Solution code:
S = input()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#A

s = set(list(input()))

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8
 
 
def main():
 
    in_data = input()
 
    if (in_data == 'AAA' or
        in_data == 'BBB'):
        print('No')
    else:
        print('Yes')
 
    return 0
  
  
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
s = input()
s_set = set(s)

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

Submission status: Accepted

Solution code:
s = input()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
strStation = input()

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

Submission status: Accepted

Solution code:
S = list(input())
ans ="No"
for i in range(3):
  if S[i] != S[(i+1)%3]:
    ans = "Yes"
print(ans)

Submission status: Accepted

Solution code:
s = str(input())

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

Submission status: Accepted

Solution code:
def main():
  p = input()
  if p[0] == p[1] == p[2]:
    return 'No'
  else:
    return 'Yes'
  

print(main())

Submission status: Accepted

Solution code:
S = input()

s1 = S[0]
s2 = S[1]
s3 = S[2]

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
s = input()
s1 = s[0]
s2 = s[1]
s3 = s[2]

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

Submission status: Accepted

Solution code:
a = input()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()
l = list(s)

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x = input()
a = False

if x == 'AAA':
    a = True
elif x == 'BBB':
    a = True

if a == True:
    print('No')
else :
    print('Yes')

Submission status: Accepted

Solution code:
from collections import *
from itertools import *
from bisect import *
from heapq import *
import copy
import math
from fractions import gcd

mod=10**9+7
#N=int(input())
S=input()
#A=list(map(int,input().split()))
if "A" in S and "B" in S:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()
s1 = s[:1]
s2 = s[1:2]
s3 = s[2:]

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

Submission status: Accepted

Solution code:
S=input()

a=S[0]
b=S[1]
c=S[2]

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()

s = dict.fromkeys(list(s))

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

Submission status: Accepted

Solution code:
Sj = list(input())

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

Submission status: Accepted

Solution code:
import re
ptr=["A{3}|B{3}"]
str=input()

for valueptr in ptr:
    pattern=re.compile(valueptr)
    res=pattern.search(str)
    if res is None:
        print("Yes")
    else:
        print("No")

Submission status: Accepted

Solution code:
S = input()

list_s = set(list(S))

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

Submission status: Accepted

Solution code:
a = input()

if a == 'BBB':
    print('No')
elif a == 'AAA':
    print('No')
else:
    print('Yes')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python
# -*- coding: utf-8 -*-

s = input()

resultA = s.find("AAA")
resultB = s.find("BBB")

if resultA == 0:
    print("No")
elif resultB == 0:
    print("No")
else:
    print("Yes")

Submission status: Accepted

Solution code:
S = list(input())

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
# 文字列の入力
s = input()
# 出力
if ('A' in s and 'B' in s) == True:
  print('Yes')
else:
  print('No')

Submission status: Accepted

Solution code:
S = input()
bus = ["ABA", "AAB", "BAA", "BAB", "ABB", "BBA"]
if S in bus:
  print('Yes')
else:
  print('No')

Submission status: Accepted

Solution code:
import numpy as np

bus = input()

if bus == "AAA":
    print("No")
elif bus == "BBB":
    print("No")
else:
    print("Yes")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s=input()
a=False
b=False
for i in range(len(s)):
    if s[i]=='A':
        a=True
    if s[i]=='B':
        b=True
if a and b:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
# coding: utf-8
from fractions import gcd 
from functools import reduce
import sys
sys.setrecursionlimit(200000000)
from inspect import currentframe


# my functions here!
#標準エラー出力
def printargs2err(*args):
    names = {id(v):k for k,v in currentframe().f_back.f_locals.items()}
    print(', '.join(names.get(id(arg),'???')+' : '+repr(arg) for arg in args),file=sys.stderr)
def debug(*args):
    print(*args,file=sys.stderr)

def printglobals():
    for (symbol, value) in globals().items():
        print('symbol="%s"、value=%s' % (symbol, value),file=sys.stderr)
def printlocals():
    for (symbol, value) in locals().items():
        print('symbol="%s"、value=%s' % (symbol, value),file=sys.stderr)
#入力（後でいじる）
def pin(type=int):
    return map(type,input().split())
     
#input

def resolve2():
    N,A,B=pin()
    ans=0
    cycle=A+B
    ans+=A*(N//cycle)
    t=N%cycle
    if t <= A:
        ans+=t
    else:
        ans+=A
    print(ans)
def resolve():
    N=input()
    cond= N=="AAA" or N=="BBB"
    print(["No","Yes"][1-cond])
    #print(N//cycle)
    #print(ans)
    #print([["NA","YYMM"],["MMYY","AMBIGUOUS"]][cMMYY][cYYMM])
#if __name__=="__main__":resolve()

"""
#printデバッグ消した？
#前の問題の結果見てないのに次の問題に行くの？
"""
"""
お前カッコ閉じるの忘れてるだろ
"""
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)

if __name__=="__main__":resolve()

Submission status: Accepted

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

print("Yes" if 1 <= S.count("A") <= 2 else "No")

Submission status: Accepted

Solution code:
s = list(input())

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
i_str = input()
stations = list(i_str)

flagA = False
flagB = False

for ss in stations:
    #print(ss)
    if ss == 'A':
        flagA = True
    elif ss == 'B':
        flagB=True

if flagA == True and flagB == True:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()

s = dict.fromkeys(list(s))

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

Submission status: Accepted

Solution code:
S = input()


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

Submission status: Accepted

Solution code:
S = str(input())

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

Submission status: Accepted

Solution code:
S = input()

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

print(ans)

Submission status: Accepted

Solution code:
s=list(input())
if s == ['A','A','A'] or s == ['B','B','B']:
  print('No')
else:
  print('Yes')

Submission status: Accepted

Solution code:
s = str(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S=list(input())
if all(s=="B" for s in S):
  print("No")
elif all(s=="A" for s in S):
  print("No")
else:
  print("Yes")

Submission status: Accepted

Solution code:
S=input()
s=S[0]
for i in range(1,3):
    if s!=S[i]:
        print("Yes")
        break
else:
    print("No")

Submission status: Accepted

Solution code:
s=list(input().split())
ans="Yes"
if s==["AAA"]:
  ans="No"
if s==["BBB"]:
  ans="No"
print(ans)

Submission status: Accepted

Solution code:
S = input()

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

Submission status: Accepted

Solution code:

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()
a = 0
b = 0
for s in S:
    if s == "A":
        a += 1
    elif s == "B":
        b += 1
if a == 0 or b == 0:
    print("No")
else:
    print("Yes")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = list(input().strip())
S_set=set(S)

print("Yes" if len(S_set)==2 else "No")

Submission status: Accepted

Solution code:
S = input()

cb=ca=0
for i in S:
    if (i=='A'):
        ca+=1

    elif (i=='B'):
        cb+=1
if(ca==3 or cb==3):
    print('No')
else:
    print('Yes')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()

flag_a = 0
flag_b = 0
for i in range(3):
  if S[i] == "A":
    flag_a += 1
  else:
    flag_b += 1
if flag_a and flag_b:
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
s = list(input())
ans = 'No'
first_station = s[0]
for c in s:
    if first_station != c:
        ans = 'Yes'

print(ans)

Submission status: Accepted

Solution code:
s = input()
ans = 'Yes'

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
raw_input = input()
l = list(raw_input)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
l = input()

if l == 'AAA':
    print('No')
elif l == 'BBB':
    print('No')
else:
    print('Yes')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()

cnt_A = 0
cnt_B = 0

for l in S:
    if l == 'A':
        cnt_A += 1
    else :
        cnt_B += 1

if cnt_A and cnt_B:
    print('Yes')
else :
    print('No')

Submission status: Accepted

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