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:
import sys
sys.setrecursionlimit(10 ** 5 + 10)
def input(): return sys.stdin.readline().strip()

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

Submission status: Accepted

Solution code:
#!/usr/bin/env Python3
import collections
import itertools as it
import math
#import numpy as np

s = input()
#  = int(input())
#  = map(int, input().split())
#  = list(map(int, input().split()))
#  = [int(input()) for i in range(N)]
#
# c = collections.Counter()

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

Submission status: Accepted

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10**6)
readline = sys.stdin.readline
s = readline()

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

Submission status: Accepted

Solution code:
import math
import queue
from collections import defaultdict
 
def readInt():
	return int(input())
def readInts():
	return list(map(int, input().split()))
def readChar():
	return input()
def readChars():
	return input().split()
def factorization(n):
	res = []
	if n%2==0:
		res.append(2)
	for i in range(3,math.floor(n//2)+1,2):
		if n%i==0:
			c = 0
			for j in res:
				if i%j==0:
					c=1
			if c==0:
				res.append(i)
	return res
def fact2(n):
	p = factorization(n)
	res = []
	for i in p:
		c=0
		z=n
		while 1:
			if z%i==0:
				c+=1
				z/=i
			else:
				break
		res.append([i,c])
	return res
def fact(n):#階乗
	ans = 1
	m=n
	for _i in range(n-1):
		ans*=m
		m-=1
	return ans
def comb(n,r):#コンビネーション
	if n<r:
		return 0
	l = min(r,n-r)
	m=n
	u=1
	for _i in range(l):
		u*=m
		m-=1
	return u//fact(l)
def printQueue(q):
	r=q
	ans=[0]*r.qsize()
	for i in range(r.qsize()-1,-1,-1):
		ans[i] = r.get()
	print(ans)

s = readChar()
x = list(s)
a = [0,0]
for i in x:
	if i=="A":
		a[0]+=1
	else:
		a[1]+=1

if max(a)==3:
	print("No")
else:
	print("Yes")

Submission status: Accepted

Solution code:
S = list(input())

result = True

for i in range(len(S)-1):
   
    if S[i] != S[i+1]:
        result = True
        break
    elif S[i] == S[i+1]:
        result = False


if result == False:
    print("No")
else:
     print("Yes")

Submission status: Accepted

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

Submission status: Accepted

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


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


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:
# -*- coding: utf-8 -*-
s = input()
ret = 'No'
if s.count('A') != 0 and s.count('B') !=0:
  ret = 'Yes'
print(ret)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = str(input())

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

if __name__ == "__main__":
    solve()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
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 len(set([S[0],S[1],S[2]])) == 1 else print('Yes')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()
ans = len(set([s[0], s[1], s[2]]))
if ans == 1:
  print("No")
else:
  print("Yes")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()

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

Submission status: Accepted

Solution code:
s=input()

a=0
b=0

for i in s:
    if i=="A":
        a+=1
    else:
        b+=1

if a==0 or b==0:
    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=[x for x in input()]
s=len(list(set(S)))

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()
p = s.count('A')
q = s.count('B')
if p == 3 or q == 3 :
    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 = set(list(input()))

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

Submission status: Accepted

Solution code:
S=input()

Ans='No'

for i in range(len(S)-1):
    if S[i]!=S[i+1]:
        Ans='Yes'
        break
        
print(Ans)

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

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

Submission status: Accepted

Solution code:
input_list = list(input())

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

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10**6) #再帰関数の上限
import math
#import queue
from copy import copy, deepcopy
from operator import itemgetter

import bisect#2分探索
#bisect_left(l,x), bisect(l,x)
from collections import deque 
#deque(l), pop(), append(x), popleft(), appendleft(x)
##listでqueの代用をするとO(N)の計算量がかかってしまうので注意
#dequeを使うときはpython3を使う、pypyはダメ
from collections import Counter#文字列を個数カウント辞書に、
#S=Counter(l),S.most_common(x),S.keys(),S.values(),S.items()
from itertools import accumulate#累積和
#list(accumulate(l))
from heapq import heapify,heappop,heappush
#q=heapq.heapify(l),heappush(q,a),heappop(q)

def input(): return sys.stdin.readline()[:-1]
def printl(li): print(*li, sep="\n")
def argsort(s): return sorted(range(len(s)), key=lambda k: s[k])

#mod = 10**9+7

S = input()
#N, K = map(int, input().split())
#L = [int(input()) for i in range(N)]
#A = list(map(int, input().split()))
#S = [inputl() for i in range(H)]
#q = queue.Queue() #q.put(i) #q.get() 
#q = queue.LifoQueue() #q.put(i) #q.get() 

#a= [[0]*3 for i in range(5)] #2次元配列はこう準備、[[0]*3]*5だとだめ
#b=copy.deepcopy(a)  #2次元配列はこうコピーする
#w.sort(key=itemgetter(1),reversed=True)  #二個目の要素で降順並び替え

#素数リスト
# n = 100
# primes = set(range(2, n+1))
# for i in range(2, int(n**0.5+1)):
#     primes.difference_update(range(i*2, n+1, i))
# primes=list(primes)

#bisect.bisect_left(a, 4)#aはソート済みである必要あり。aの中から4未満の位置を返す。rightだと以下
#bisect.insort_left(a, 4)#挿入

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

Submission status: Accepted

Solution code:
#-*- coding: utf-8 -*-
s = input()
a = s.count("A")
b = s.count("B")
print("Yes" if a==2 or b==2 else "No")

Submission status: Accepted

Solution code:
s=input().rstrip()

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

Submission status: Accepted

Solution code:
s = input()

s = set(s)

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

Submission status: Accepted

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

S = input()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()
count = 0
for i in range(len(S)-1):
    if S[i] != S[i+1]:
      count+=1
    else:
      continue
if count>=1:
  print('Yes')
else:
  print('No')

Submission status: Accepted

Solution code:
s=input()

a=0
b=0

for i in s:
    if i=="A":
        a=a+1
    else:
        b=b+1

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s =input()

c = s.count('A')

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

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

Submission status: Accepted

Solution code:
S = input()

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

print('Yes')

Submission status: Accepted

Solution code:
s = list(input())

if 'A' not in s or 'B' not in s:
    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:
N=input()
a=N.count('A')
b=N.count('B')
if a==3 or b==3:
  print('No')
else:
  print('Yes')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = list(input())
if s[0] == s[1]:
    if s[1] == s[2]:
        print('No')
    else:
        print('Yes')
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:
# coding: utf-8
# Your code here!

S = input()#.strip()

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
i = input()
if i[-1]==i[-2] and i[-2]==i[-3]:
    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[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 = 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:
# input
S = input()

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

Submission status: Accepted

Solution code:
s=input()
print("YNeos"[s=="AAA" or s=="BBB"::2])

Submission status: Accepted

Solution code:
str1 = str(input())

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


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
print(["No", "Yes"][len(set(input())) - 1])

Submission status: Accepted

Solution code:
s = input()

a = s[0]

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

Submission status: Accepted

Solution code:
s = list(input())

s = set(s)

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

Submission status: Accepted

Solution code:
import sys
S = input()
cond = (S=="AAA") | (S=="BBB")
ans = "No" if cond 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=list(input())

if s.count('A')==0 or s.count('B')==0:
  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()
ca = S.count("B")
cb = S.count("A")

if  ca == 3 or cb == 3:
  print("No")
else:
  print("Yes")

Submission status: Accepted

Solution code:
import sys;input=lambda:sys.stdin.readline().rstrip();aint=lambda:int(input());ints=lambda:list(map(int,input().split()))
import math;floor,ceil=math.floor,math.ceil
from collections import deque
Yes=lambda b:print('Yes')if b else print('No');YES=lambda b:print('YES')if b else print('NO')
is_even=lambda x:True if x%2==0 else False

def main():
  s=input()
  Yes(s[0]!=s[1]or s[2]!=s[1]or s[0]!=s[2])

if __name__ == '__main__':
  main()

Submission status: Accepted

Solution code:
s = input()
x={}
for i in s:
    if i not in x:
        x[i]=1
    else:
        x[i]+=1
count=0
for i in list(x.values()):
    count+=1
if(count==2):
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

s = input()

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

else :
    print("Yes")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
# input処理を高速化する
input = sys.stdin.readline

S=input()

cnt_a = S.count('A')
cnt_b = S.count('B')

if cnt_a>0 and cnt_b>0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
S = input()
print('Yes') if all(['A' in S, 'B' in S]) else print('No')

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
def main():
    S = input()
    if (S[0] != S[1]) or (S[1] != S[2]) or (S[2] != S[0]) :
        print("Yes")
    else:
        print("No")
if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
print('YNeos'[len(set(input()))==1::2])

Submission status: Accepted

Solution code:
S = input()

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
s = sys.stdin.readline().rstrip()
if s == 'AAA' or s == 'BBB':
  print('No')
else:
  print('Yes')

Submission status: Accepted

Solution code:
stations = set(str(input()))
if len(stations) == 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:
S1,S2,S3 = input()
if S1 == S2 == S3 :
    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' and S != 'BBB':
    print('Yes')
else :
    print('No')

Submission status: Accepted

Solution code:
import sys

sys.setrecursionlimit(10 ** 7)
rl = sys.stdin.readline


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


if __name__ == '__main__':
    solve()

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
s = set(input())

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

Submission status: Accepted

Solution code:
s = input()

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

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:
str  = input()
a = False
b = False
for ch in str:
    if ch == 'A':
        a = True
    else:
        b = True
if a and b:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
import sys
from copy import copy
input = sys.stdin.readline
'''
n, m = map(int, input().split())
n = int(input())
A = list(map(int, input().split()))
S = input().strip()
for test in range(int(input())):
'''
inf = 100000000000000000  # 1e17
mod = 998244353

S = input().strip()
for i in range(1,len(S)):
    if S[i]!=S[i-1]:
        print("Yes")
        sys.exit()
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[0]==s[1]and s[1]==s[2]:

    print("No")

else:print("Yes")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()

num = len(set(s))  # set型に変換するとダブりが消えるので、lenで種類数がわかる

if num == 1:
    print("No")
else:
    print("Yes")

Submission status: Accepted

Solution code:
s = input()
n = len(s) # sの長さn

a_only = "A" * n # Aがn文字続く文字列
b_only = "B" * n # Bがn文字続く文字列 

if s == a_only or s == b_only:
    print("No")
else:
    print("Yes")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

if len(set(l)) == 1:
  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:
s = input()

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

Submission status: Accepted

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

def RD(): return sys.stdin.read()
def II(): return int(input())
def MI(): return map(int,input().split())
def LI(): return list(map(int,input().split()))
def TI(): return tuple(map(int,input().split()))


def main():
    N = input()
    N = str(N)
    Sa = N.count("A")
    if Sa == 1 or Sa == 2:
        print("Yes")
    else:
        print("No")



if __name__ == "__main__":
	main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = list(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N =str(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#文字列の格納
list_station = list(input())

#文字列の初期化
text = "No"
i = 0

#判別
while i < len(list_station) - 1:
    if list_station[i] != list_station[i+1]:
        text = "Yes"
        break
    else:
        i += 1

#結果の表示
print(text)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()
flag = False
if (s[0] == 'A' and s[1] == 'B') or (s[0] == 'B' and s[1] == 'A'):
    flag = True

if (s[1] == 'A' and s[2] == 'B') or (s[1] == 'B' and s[2] == 'A'):
    flag = True

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

Submission status: Accepted

Solution code:
station = [char for char in input()]

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

Submission status: Accepted

Solution code:
S = input()
if S.__contains__("AAA") or S.__contains__("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 module
import sys
import math
import numpy as np

S = input()

if S.find("A") != -1 and S.find("B") != -1:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
temp = input()

judgment1 = 'A' in temp
judgment2 = 'B' in temp

if judgment1 == True:
    if judgment2 == True:
        print("Yes")
    else:
        print("No")
else:
    print('No')

Submission status: Accepted

Solution code:
s = input()

if s.find("A") == -1 or s.find("B") == -1:
    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:
S = input()

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

Submission status: Accepted

Solution code:
from sys import stdin


if __name__ == "__main__":
    _in = [_.rstrip() for _ in stdin.readlines()]
    S =     _in[0]   # type:str
    # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
    TF = 'Yes' if 'A' in S and 'B' in S else 'No'
    # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    print(TF)

Submission status: Accepted

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

Submission status: Accepted

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

if flag == 0:
    print("No")
else:
    print("Yes")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
def main():
  S = input()
  if "A" in S and "B" in S:
    print("Yes")
    exit(0)
    
  print("No")
main()

Submission status: Accepted

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