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:
s=input()
count=s.count("B")
if count==3 or count==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 = input()
if S=='AAA' or S == 'BBB':print('No')
else:print('Yes')

Submission status: Accepted

Solution code:
s = input()

s_count_A = s.count('A')

if s_count_A == 0 or s_count_A == 3:
    ans = 'No'
else:
    ans = 'Yes'

print(ans)

Submission status: Accepted

Solution code:
def resolve():
    s = input()
    if s.count('A') == 0 or s.count('B')== 0:
        print('No')
    else:
        print('Yes')
resolve()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# AAA or BBB ならNo

S = list(input())

S_sorted = ''.join(sorted(S))
# print(S_sorted)

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

Submission status: Accepted

Solution code:
S=input()

list=[]
t=0
while t<=2:
    list.append(S[t])
    t=t+1

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

Submission status: Accepted

Solution code:
s=list(input())
if s[1]=="A" and s[0]=="A" and s[2]=="A":
  print("No")
elif s[1]=="B" and s[0]=="B" and s[2]=="B":
  print("No")

else:
  print("Yes")

Submission status: Accepted

Solution code:
S = list(map(str,input()))

if S[0] != S[1] or S[1] != S[2]:
    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[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")
if s[0]!=s[1] or s[1]!=s[2]:
    print("Yes")

Submission status: Accepted

Solution code:
s = str(input())

if s[0] == 'A':
    t = 'B'
else:
    t = 'A'

answer = s.find(t)

if answer != -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 ('A' in s) and ('B' in s):
    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:
Station = []
Station = input()

if Station == "AAA":
    print("No")

elif Station == "BBB":
    print("No")
else:
    print("Yes")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# 駅１、２、３
# 管理状況はAAB,ABA、BBA,BBBなど、長さ３の文字列で表される
# AとBの駅の間にはバスを運行することにした
# バスが運行することになる組み合わせが存在するかどうか判定し、yes,noで出力
s = input('')
if s == 'AAA' or s == 'BBB':
    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:
S = input()
print('Yes' if 'A' in S and 'B' in S else '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[0] == S[1] == S[2]:
  print('No')
else:
  print('Yes')

Submission status: Accepted

Solution code:
n = input()

if n.count('A') == 3 or n.count('B') == 3:
  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()
count=0
for i in range(0,len(list(s))-1):
    if(s[i]!=s[i+1]):
        count+=1
    elif(s[i]==s[i+1]):
        count+=0

if(count>1 or count==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()
print('No' if s == 'AAA' or s == 'BBB' else 'Yes')

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
s = list(input())

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = input()
print(('Yes', 'No')[N[0] == N[1] == N[2]])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()
ans = 'No' if S == 'AAA' or S == 'BBB' else '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:
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time, copy

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

stdin = sys.stdin

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

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

Submission status: Accepted

Solution code:
s = input()
n = len(s)
sa = 'A'*n
sb = 'B'*n

if s != sa and s != sb:
  print('Yes')
else:
  print('No')

Submission status: Accepted

Solution code:
# A - Station and Bus
# https://atcoder.jp/contests/abc158/tasks/abc158_a

s = input()

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

Submission status: Accepted

Solution code:
S = input()

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

Submission status: Accepted

Solution code:
S = list(input())
countA = 0
countB = 0

for i in range(0, len(S)):
    if S[i] == "A":
        countA += 1
    elif S[i] == "B":
        countB += 1

if countA == 3 or countB == 3:
    print("No")
else:
    print("Yes")

Submission status: Accepted

Solution code:
S = str(input())

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

Submission status: Accepted

Solution code:
S = str(input())
if S != 'AAA' and S != 'BBB':
    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:
s = input()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# 158a

def atc_158a(input_value: str) -> str:
    if input_value == "AAA" or input_value == "BBB":
        return "No"
    return "Yes"


input_value = input()
print(atc_158a(input_value))

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()

f = S[0]

if S.count(f) == 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=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()
print('Yes' if len(set(S)) != 1 else 'No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
st = input()

if st[0] == st[1] and st[1] == st[2] and st[0] == st[2]:
    print("No")

else:
    print("Yes")

Submission status: Accepted

Solution code:
S=input()
if S.count('A')==1 or S.count('A')==2:
  print('Yes')
else:
  print('No')

Submission status: Accepted

Solution code:
S = input()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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

if s.count("A")>=1:
    if s.count("B")>=1:
        print("Yes")
    else:
        print("No")
else:
    print("No")

Submission status: Accepted

Solution code:


# 標準入力S

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:

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

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
S = str(input())

# バスが運行することになる駅の組み合わせが存在する場合は Yes を、存在しない場合は No を出力せよ。

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

Submission status: Accepted

Solution code:
K=input()
if K=='AAA' or K=='BBB':
    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=input()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()
print('No' if S == 'A' * len(S) or S == 'B' * len(S) else 'Yes')

Submission status: Accepted

Solution code:
# 文字列の取得しリストに格納
S = str(input())
S_list = list(S)

# 隣接する文字列を比較し結果を出力
if S_list[0] != S_list[1]\
or S_list[1] != S_list[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:
S = str(input())

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
S = input()

print("Yes" if S.count("A") and S.count("A") < 3 or S.count("B") and S.count("B") < 3 else "No")

Submission status: Accepted

Solution code:
s = input()

if s.count('B') == 3 or s.count("A") == 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()
if len(list(set(s))) == 1:
    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:
from sys import exit
import math
ii = lambda : int(input())
mi = lambda : map(int,input().split())
li = lambda : list(map(int,input().split()))

s = input()

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

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:
S = input()
print("No" if S == "AAA" or S == "BBB" else "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:
N = input()
char_list = list(N)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
station_patterns = input()

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

Submission status: Accepted

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

print(result)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import bisect, collections, copy, heapq, itertools, math, string
import sys
def I(): return int(sys.stdin.readline().rstrip())
def MI(): return map(int, sys.stdin.readline().rstrip().split())
def LI(): return list(map(int, sys.stdin.readline().rstrip().split()))
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())

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

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
print('Yes' if ['A','B'] == sorted(set(input())) else 'No')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()
 
# AAAかBBBならNo、それ以外でYes
if S[0] == S[1] and S[1] == S[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()
if S[0]==S[1] and S[1]==S[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 = list(input())
if "A" in S and "B" in S:
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
import bisect,collections,copy,itertools,math,string
import sys
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())
def main():
    s = S()
    ans = not(len(set(list(s)))==1)
    print("Yes" if ans else "No")
main()

Submission status: Accepted

Solution code:

S = str(input())

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

Submission status: Accepted

Solution code:
s=input()
l=set(s)
if(len(l)==1):
    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:
O = ['Yes','No']
S = str(input())
f = 0
if S == 'AAA' or S == 'BBB':
    f = 1
print(O[f])

Submission status: Accepted

Solution code:
# import itertools
# import math
# import sys
# sys.setrecursionlimit(500*500)
# import numpy as np

# N = int(input())
S = input()
# n, *a = map(int, open(0))
# N, M = map(int, input().split())
# A = list(map(int, input().split()))
# B = list(map(int, input().split()))
# tree = [[] for _ in range(N + 1)]
# B_C = [list(map(int,input().split())) for _ in range(M)]

# B_C = sorted(B_C, reverse=True, key=lambda x:x[1])
# all_cases = list(itertools.permutations(P))
# a = list(itertools.combinations_with_replacement(range(1, M + 1), N))
# itertools.product((0,1), repeat=n)

# A = np.array(A)
# cum_A = np.cumsum(A)
# cum_A = np.insert(cum_A, 0, 0)

# def dfs(tree, s):
#     for l in tree[s]:
#         if depth[l[0]] == -1:
#             depth[l[0]] = depth[s] + l[1]
#             dfs(tree, l[0])
# dfs(tree, 1)

# def factorization(n):
#     arr = []
#     temp = n
#     for i in range(2, int(-(-n**0.5//1))+1):
#         if temp%i==0:
#             cnt=0
#             while temp%i==0:
#                 cnt+=1
#                 temp //= i
#             arr.append([i, cnt])
#     if temp!=1:
#         arr.append([temp, 1])
#     if arr==[]:
#         arr.append([n, 1])
#     return arr

A = S.count("A")
B = S.count("B")

if 0 < A < 3:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
ins = lambda: input().rstrip()
ini = lambda: int(input().rstrip())
inm = lambda: map(int, input().split())
inl = lambda: list(map(int, input().split()))
out = lambda x: print('\n'.join(map(str, x)))

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

Submission status: Accepted

Solution code:
s = input().rstrip()
if s == "AAA" or s == "BBB":
    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 = list(input())
if len(set(S)) == 1:
  print("No")
else:
  print("Yes")

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys

input = sys.stdin.readline


def Y():
    print("Yes")


def N():
    print("No")


def ST():
    return input().rstrip()


def I():
    return int(input())


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


def LI():
    return list(MI())


S = ST()

if ("A" not in S) or ("B" not in S):
    N()
else:
    Y()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()

S = list(s)

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

Submission status: Accepted

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

Submission status: Accepted

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

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


if __name__ == "__main__":
    main()

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

Submission status: Accepted

Solution code:
a = input()
b = 0
c = 0
i = 0
while i < len(a) :
    if a[i] == "A" :
        b = b + 1
    if a[i] == "B" :
        c = c + 1
    i = i + 1
if (b > 0) and (c > 0) :
    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 = set(input())

ans='No'
if len(S)==2:
    ans='Yes'
    
print(ans)

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

Submission status: Accepted

Solution code:
s=input()

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
import numpy as np
import sys
S=input()
if S=="AAA" or S=="BBB":
    print("No")
else:
    print("Yes")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()

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

Submission status: Accepted

Solution code:
s=input()

jud = s[0]

if jud == s[1] == s[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 = sorted(list(input().rstrip()))
r = 'Yes' if S[0] != S[2] else 'No'
print(r)

Submission status: Accepted

Solution code:
def resolve():
    S = input()
    print("No" if S in ["AAA", "BBB"] else "Yes")

if '__main__' == __name__:
    resolve()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = list(input())

#print(set(S))
setS = set(S)

if len(setS) == 2:
    print("Yes")
else:
    print("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:
S = input()
if 'AB' in S or 'BA' in S:
  o = 'Yes'
else:
  o = 'No'
print(o)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/python3
import sys
input = lambda: sys.stdin.readline().strip()
s = input()
print('No' if s == 'AAA' or s == 'BBB' else 'Yes')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = str(input())
if 1 <= s.count('AB') or 1 <= s.count('BA'):
    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:
if __name__ == '__main__':

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

Submission status: Accepted

Solution code:
n = list(input())
if n[0] == n[1] and n[1] == n[2]:
  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:
#ABC158-A
s=input()
if s!='AAA' and s!='BBB':
  print('Yes')
else:
  print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s=input()
a=s[0]
for i in range(2):
  if s[i+1]!=s[i]:
    print('Yes')
    exit()
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:
S = input()
print("No" if S == "AAA" or S == "BBB" else "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()
print("No" if s=="AAA" or s=="BBB" else "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:
import re
s = input()
x = s[0]
m = re.match(x+x+x,s)
if m:
    print("No")
    exit()
print("Yes")

Submission status: Accepted

Solution code:
s = input()
st = s[0]
flag = False
for i in range(1,3):
  if st != s[i]:
    flag = True
    break
if flag:
  print('Yes')
else:
  print('No')

Submission status: Accepted

Solution code:
s = input()

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

Submission status: Accepted

Solution code:

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


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
s = input()

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

Submission status: Accepted

Solution code:
import sys
lst_st = list(input())

for i in range(2):
  if (lst_st[i] != lst_st[i+1]):
    print("Yes")
    sys.exit()
  else:
    continue
else:
  print("No")

Submission status: Accepted

Solution code:
S = input()
if S.count("A") in [0, 3]:
    print("No")
else:
    print("Yes")

Submission status: Accepted

Solution code:
s=str(input())

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

Submission status: Accepted

Solution code:
s = input()

if 'AB' in s or 'BA' in s:
    print('Yes')
else:
    print('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:
if len(set(input())) == 1:
    print('No')
else:
    print('Yes')

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
i = input()

c = True
for x in range(1,len(i)):
    if i[0] != i[x]:
        c = False
        print("Yes")
        break

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# Station and Bus
S = input()
ans = ['No', 'Yes'][int('A' in S) + int('B' in S) - 1]
print(ans)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def solve():
    s = input()
    if s in ("AAA", "BBB"):
        print("No")
    else:
        print("Yes")

if __name__ == "__main__":
    solve()

Submission status: Accepted

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