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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

# 整数の入力
station = input()

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

Submission status: Accepted

Solution code:
x = set(input())
print('No' if len(x)==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()

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

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 = str(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[0]==S[1] and S[1]==S[2] and S[2]==S[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()
print("No" if len(set(S))==1 else "Yes")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin


def get_result(data):
    S = data[0]
    return 'Yes' if S != 'AAA' and S != 'BBB' else 'No'


if __name__ == '__main__':
    data = list(map(str, stdin.readline().rstrip('\n').split(' ')))
    result = get_result(data)
    print(result)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!usr/bin/env python3
from collections import defaultdict, deque
from heapq import heappush, heappop
from itertools import permutations
import sys
import math
import bisect


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


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


def LS(): return [list(x) for x in sys.stdin.readline().split()]


def S():
    res = list(sys.stdin.readline())
    if res[-1] == "\n":
        return res[:-1]
    return res


def IR(n):
    return [I() for i in range(n)]


def LIR(n):
    return [LI() for i in range(n)]


def SR(n):
    return [S() for i in range(n)]


def LSR(n):
    return [LS() for i in range(n)]


sys.setrecursionlimit(1000000)
mod = 1000000007


def solve():
    s = S()
    if 'A' in s and 'B' in s:
        print('Yes')
    else:
        print('No')
    return


# Solve
if __name__ == "__main__":
    solve()

Submission status: Accepted

Solution code:
print("YNeos"[2-len(set(input()))::2])

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().encode("ASCII")

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

Submission status: Accepted

Solution code:
s = list(input())
lens = len(set(s))
if lens ==1:
    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=set(list(input()))

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

S=str(input())

S_list=list(S)

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()

s = list(S)

ans = 'Yes'

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

ans = 'Yes'

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

print(ans)

Submission status: Accepted

Solution code:
s = input()
if len(set(s)) == 1:
  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
  elif i=="B":
    b+=1
if (a+b)!=3 or (a==0 or b==0):
  print("No")
else:
  print("Yes")

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
#import math

# 整数の入力
station = input()

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

Submission status: Accepted

Solution code:
n=input()

if n=="AAA" or n=="BBB":
  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 == 'AAB' or s == "ABA" or s == 'ABB' or s == 'BAA' or s =="BAB" or s=="BBA":
    print("Yes")
else:
    print('No')

Submission status: Accepted

Solution code:
S = input() 

if S.replace("A" ,"") == "" or S.replace("B", "") == "":
    print("No")
else:
    print("Yes")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
comp = input()
if comp.count('A') == 0 or comp.count('A') == 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()

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

Submission status: Accepted

Solution code:
a,b,c = input()
if a == b == c:
  print('No')
else:
  print("Yes")

Submission status: Accepted

Solution code:
s = list(input())
if s.count("A") == len(s) or s.count("A") == 0:
  print("No")
else:
  print("Yes")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def A():
    S = input()
    s = "Yes"
    if (S=="AAA") or (S=="BBB"):
        s = "No"
    print(s)
    return s


if __name__ == '__main__':
    A()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = list(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()
if S.count(S[0]) == 3:
  print('No')
else:
  print('Yes')

Submission status: Accepted

Solution code:
txt = input()
a,b,c = list(txt)
if a == b:
  if b == c:
    print('No')
  else:
    print('Yes')
else :
  print('Yes')

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
s = list(input())
ans = "Yes"
if len(set(s)) == 1:
  ans = "No" 
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

m=input()
m2=[m[:1],m[1:2],m[2:]]

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

Submission status: Accepted

Solution code:
s = input()

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

Submission status: Accepted

Solution code:
s = input()
if (s[:2] == "AB" or s[:2] == "BA" or s[-2:] == "AB" or s[-2:] == "BA"):
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
str = input()

if str == 'AAA':
    print('No')
elif str == '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:
operator = input().strip()
a, b = 0, 0

for i in operator:
  if i == "A":
    a += 1
  else:
    b += 1
if a == 2:
  print("Yes")
elif b == 2:
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
def solve():
	ar=input()
	a=0
	b=0
	for i in ar:
		if(i=='A'):
			a+=1
		else:
			b+=1;
	if(a==0 or b==0):
		print("No");
	else:
		print("Yes");			
t=1
#t=int(input())
while(t>0):
	solve()
	t-=1

Submission status: Accepted

Solution code:
s = input()

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

Submission status: Accepted

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

s = raw_input()
solve(s)

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()
 
#listを一文字ずつのlistに
S_list = list(S)
 
AorB = S_list[0]
counter = 0
for i in range(len(S_list)):
  if(AorB == S_list[i]):
    counter = counter + 1
 
if(counter == len(S_list)):
  print("No")
else:
  print("Yes")

Submission status: Accepted

Solution code:
Station = input()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import numpy as np

s=sys.stdin.readline()
if s[0]==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 = input()
ans ='No'
if 'A' in S:
  if 'B' in S:
    ans = 'Yes'
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

x = sys.stdin.readline()

a=0
b=0

for i in x:
  if ( i == 'A'):
    a = 1
  if ( i == 'B'):
    b = 1

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

sys.stdout.flush()

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

Submission status: Accepted

Solution code:
while True:
    sta = input()
    if len(sta) == 3:
        break

judge = ""
count = 0
result = ""
station = [sta[0], sta[1], sta[2]]
for ss in station:
    if count == 0:
        judge = ss
    else:
        if ss == judge:
            result = "No"
        else:
            result = "Yes"
            break
            
    count = 1
print(result)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
st = str(input())
while(True):
  if(st == "AAA"):
    print("No")
    break
  elif(st == "BBB"):
    print("No")
    break
  else:
    print("Yes")
    break

Submission status: Accepted

Solution code:
s = input()

if all((s[i] == 'A' for i in range(3))):
    print('No')
elif all((s[i] == 'B' for i in range(3))):
    print('No')
else:
    print('Yes')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
readline = sys.stdin.readline
s = set(readline().strip())
if len(s) != 1:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
c=input().count('A')
print('No' if c==3 or c==0 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 ('A' in S) and ('B' in S):
  print('Yes')
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 = input();

if s.count("B") * s.count("A") != 0:
    print("Yes");
else:
    print("No");

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = input()

for i in range(3):
  if i == 2:
    break
  elif a[i] != a[i+1]:
    break

if i == 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())

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

Submission status: Accepted

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!

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

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

if 'A' in s and 'B' in s:
  print("yes".capitalize())
else:
  print("no".capitalize())

Submission status: Accepted

Solution code:
s =  input()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
# スペース区切りの整数の入力
# b, c =
# a = int(input())
n = str(input())
#target_list = [int(i) for i in input().split()]

# 判定
if len(list(set(n)))==2:
    print("Yes")
else:
    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:





S ,= input().split()
N = len(set(list(S)))
if N == 1:
	print ('No')
else:
	print ('Yes')

Submission status: Accepted

Solution code:
s = input()
if len(s) != 3:
    print('No')
if s.upper() == 'AAA' or s.upper() == 'BBB' :
    print('No')
else:
    print('Yes')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
s = input()
s = set([ss for ss in s])
if len(s) > 1:
  print('Yes')
else:
  print('No')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
# Input of 3 stations
stations = input() # i.e. ABA

def needBus(s):
  '''<str> s: 3 stations'''
  if ((s[0] != s[1]) or (s[1] != s[2])):
    return 'Yes'
  else:
    return 'No'
  
# Output
print(needBus(stations))

Submission status: Accepted

Solution code:
S = input()

f = S[0]
for s in S[1:]:
    if f != s:
        print('Yes')
        break
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
char_a = input()
first = char_a[0]
count = 0
for i in [1,2]:
  if char_a[i] != first:
    count += 1
    print("Yes")
    break
if count == 0: 
  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:
x,y,z = input()
if x == y and y == z and x == y:
    print('No')
else:
    print('Yes')

Submission status: Accepted

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

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

flag = False

if S[0] != S[1]:
    flag = True

if S[1] != S[2]:
    flag = True

if flag:
    print("Yes")

else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()

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

Submission status: Accepted

Solution code:
print(["No","Yes","Yes","No"][sum([s=="A" for s in input()])])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()
if S.count('AB') is 0 and S.count('BA') is 0:
    print('No')
else:
    print('Yes')

Submission status: Accepted

Solution code:
S = str(input())
if S.count('AB') is 0 and S.count('BA') is 0:
    print('No')
else:
    print('Yes')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s=input()
ca=0
for i in s:
  if(i=="A"):
    ca+=1
if(ca==1 or ca==2):
  print("Yes")
else:
  print("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=input()
if s == "ABB" :
    print("Yes")
elif s == "AAB" :
    print("Yes")
elif s == "ABA" :
    print("Yes")
elif s == "BAA" :
    print("Yes")
elif s == "BBA" :
    print("Yes")
elif s == "BAB" :
    print("Yes")
else :
    print("No")

Submission status: Accepted

Solution code:
class Solution:
    def solve(self, S: str) -> str:

        if S == 'AAA' or S == 'BBB':
            return 'No'
        else:
            return 'Yes'


if __name__ == '__main__':

    # standard input
    S = input()

    # solve
    solution = Solution()
    print(solution.solve(S))

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()
print('No' if s[0] == s[1] == s[2] else '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:
buses = input()
first = buses[0]
count = 0
for i in buses:
	if (i == first):
    	   count += 1
if count == len(buses):
	print("No")
else:
	print("Yes")

Submission status: Accepted

Solution code:
S=input()
i=len(set(S))
if i==1:
  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 = str(input())
if 'AB' in S or 'BA' 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:
S = input()
ans = 'Yes'
if S == 'AAA':
    ans = ('No')
if S == 'BBB':
    ans = ('No')

print(ans)

Submission status: Accepted

Solution code:
S = input()
A = 0
B = 0
for i in S:
    if i == "A":
        A+=1
    elif i == "B":
        B += 1

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
s = input()
vis_a = 0
vis_b = 0

for i in s:
  if i == 'A':
    vis_a = 1
  if i == 'B':
    vis_b = 1

if vis_a and vis_b:
    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:
s = input()
if s.count('A') == 3 or s.count('B') == 3:
    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:
inp=input()
ans='Yes'
if inp=='AAA' or inp=='BBB':
  ans='No'
print(ans)

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:
#!/usr/bin/env python3
# coding: utf-8

# In[ ]:


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

Submission status: Accepted

Solution code:
S=input()
count=0
for i in range(2):
  if S[i]==S[i+1]:
    count+=1
if count==2:
  print("No")
else:
  print("Yes")

Submission status: Accepted

Solution code:
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,copy,functools
import time,random

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

def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(): return [list(map(int, l.split())) for l in sys.stdin.readlines()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
def pf(s): return print(s, flush=True)
def pe(s): return print(str(s), file=sys.stderr)
def JA(a, sep): return sep.join(map(str, a))
def JAA(a, s, t): return s.join(t.join(map(str, b)) for b in a)


def main():
    s = S()
    c = collections.Counter(s)
    if len(c) == 1:
        return "No"

    return "Yes"


print(main())

Submission status: Accepted

Solution code:
S = input()

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

if S != "AAA" and S != "BBB":
    print("Yes")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = set([c for c in input()])

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

Submission status: Accepted

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

a = s.count("A")
b = s.count("B")

if a * b == 0:
    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('No' if S == (S[0] * len(S)) else 'Yes')

Submission status: Accepted

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

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

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

if s != "AAA" and s != "BBB":
  print("Yes")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
from collections import Counter

sys.setrecursionlimit(1000000)
input = lambda: sys.stdin.readline().rstrip()

S = input()
print('Yes' if len(Counter(S).keys()) == 2 else 'No')

Submission status: Accepted

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

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 s.count("A") == 3 or s.count("B") == 3:
    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:
#!/usr/bin/env python3

n = input()
if "AB" in n or "BA" in n:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(1000000)
input = sys.stdin.readline
from bisect import *
from collections import *
from heapq import *
INF = 500000
mod = 10**9+7

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

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