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
from itertools import combinations, permutations, product, combinations_with_replacement, accumulate
from heapq import heapify, heappop, heappush, heappushpop
from bisect import bisect_left, bisect_right
#from collections import Counter, defaultdict, deque
#from math import sqrt, log, floor, ceil, factorial, cos, sin, pi, gcd
sys.setrecursionlimit(10**5)
input = sys.stdin.readline
INF = float('inf')
LINF = 2**63-1
NIL = -LINF
MOD = 10**9+7
MGN = 4
def II(): return int(input())
def IF(): return float(input())
def IS(): return str(input())
def ILCI(n: int): return [II() for _ in range(n)]
def ILCF(n: int): return [IF() for _ in range(n)]
def ILI(): return list(map(int, input().split()))
def ILLI(n: int): return [[int(j) for j in input().split()] for i in range(n)]
def ILF(): return list(map(float, input().split()))
def ILLF(n: int): return [[float(j) for j in input().split()] for i in range(n)]
def LTOS(lst: list, sep: str = ' '): return sep.join(map(str, lst))
def DEC(lst: list): return list(map(lambda x: x-1, lst))
def INC(lst: list): return list(map(lambda x: x+1, lst))


def main():
    S = IS()

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


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
sys.setrecursionlimit(10**5)
input = sys.stdin.readline
INF = float('inf')
LINF = 2**63-1
NIL = -LINF
MOD = 10**9+7
MGN = 4
def II(): return int(input())
def IF(): return float(input())
def IS(): return str(input())
def ILCI(n: int): return [II() for _ in range(n)]
def ILCF(n: int): return [IF() for _ in range(n)]
def ILI(): return list(map(int, input().split()))
def ILLI(n: int): return [[int(j) for j in input().split()] for i in range(n)]
def ILF(): return list(map(float, input().split()))
def ILLF(n: int): return [[float(j) for j in input().split()] for i in range(n)]
def LTOS(lst: list, sep: str = ' '): return sep.join(map(str, lst))
def DEC(lst: list): return list(map(lambda x: x-1, lst))
def INC(lst: list): return list(map(lambda x: x+1, lst))


def main():
    S = IS()

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


if __name__ == '__main__':
    main()

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S=input()
print("Yes" if len(set(S))!=1 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()
A_cnt = S.count('A')
B_cnt = S.count('B')
if A_cnt == 0 or B_cnt == 0:
    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 == 'AAA' or S == 'BBB':
  print('No')
else:
  print('Yes')

Submission status: Accepted

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

Submission status: Accepted

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


arr = list(set(s))
if len(arr) == 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:
N = list(input())

answer = 'No'
count = N.count('A')
if count != 3 and count != 0:
    answer = 'Yes'

print(answer)

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:
print('No') if input().count('A') in [0, 3] else print('Yes')

Submission status: Accepted

Solution code:
S=input()
c=0
for i in range(len(S)-1):
    if S[i]!=S[i+1]:
        c=c+1
        break 
if 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:
AB = input()
if AB == "AAA" or AB == "BBB":
  print("No")
else:
  print("Yes")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
bus_services=input()

service=False
for i in range(len(bus_services)-1):
  if bus_services[i]!=bus_services[i+1]:
    service=True
if service==True:
  print('Yes')
else:
  print('No')

Submission status: Accepted

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

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


def solve(S: str):
   if len(set(list(S))) != 1:
   	print(YES)
   else:
   	print(NO)


# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    S = next(tokens)  # type: str
    solve(S)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

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:
if __name__== '__main__':
  s = 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:

S = input()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

S = str(input().strip('\n'))

if len(S) != 3 or S == 'AAA' or S == 'BBB':
    print('No')
    sys.exit()
else:
    for Count in range(1,4):
        if S[Count-1] =='A' or \
           S[Count-1] =='B':
            pass
        else:
            print('No')
            sys.exit()

print('Yes')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
stdin = input()
if len(set(stdin)) == 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:
#abc158a
s=raw_input()
if s.count('A')==3 or s.count('B')==3:
 print 'No'
else:
 print '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 = set(input())

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

Submission status: Accepted

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

else: print('Yes')

Submission status: Accepted

Solution code:
class StationAndBus:
    def __init__(self):
        self.result = False
    
    def check_combination(self, str_list):
        if str_list.count(str_list[0]) == 0 or str_list.count(str_list[0])==3:
            self.result = False
        else:
            self.result = True
        return self.result

if __name__ == "__main__":
    S=list(input())
    sab = StationAndBus()
    result=sab.check_combination(S)
    if result:
        print("Yes")
    else:
        print("No")

Submission status: Accepted

Solution code:
stations = input()

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
from collections import defaultdict,deque
from heapq import heappush, heappop
from bisect import bisect_left, bisect_right
import sys, random, itertools, math
sys.setrecursionlimit(10**5)
input = sys.stdin.readline
sqrt = math.sqrt
def LI(): return list(map(int, input().split()))
def LF(): return list(map(float, input().split()))
def LI_(): return list(map(lambda x: int(x)-1, input().split()))
def II(): return int(input())
def IF(): return float(input())
def LS(): return list(map(list, input().split()))
def S(): return list(input().rstrip())
def IR(n): return [II() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def FR(n): return [IF() for _ in range(n)]
def LFR(n): return [LI() for _ in range(n)]
def LIR_(n): return [LI_() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
mod = 1000000007
inf = float('INF')

#solve
def solve():
    s = S()
    print("Yes" if len(set(s)) == 2 else "No")
    return


#main
if __name__ == '__main__':
    solve()

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 ('A' in s and 'B' in s) else 'No')

Submission status: Accepted

Solution code:
strs = input()
count_A = strs.count('A')
if count_A > 0 and count_A < 3:
  print('Yes')
else:
  print('No')

Submission status: Accepted

Solution code:
# coding: utf-8
A=input()

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

Submission status: Accepted

Solution code:
S = list(input())

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s=list(input().strip())
x=s.count(s[0])
if x==0 or x==3:
    print('No')
else:
    print('Yes')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()
a,b,c = list(S)

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

def I(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def LMI(): return list(map(int, sys.stdin.readline().split()))
MOD = 10 ** 9 + 7

S = input()
print('Yes' if S.count('A') > 0 and S.count('B') > 0 else '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()
for i in range(2):
    if s[i] != s[i + 1]:
        print("Yes")
        break
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()

a = s[0]
for i in range(1, 3) :
  if(s[i] != a) :
    print("Yes")
    exit()
print("No")

Submission status: Accepted

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

ans = set(S)

print("Yes" if len(ans)>=2 else "No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def solve(s):
    return "Yes" if len(set(s)) > 1 else "No"

s = input()
print(solve(s))

Submission status: Accepted

Solution code:
#python3

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

Submission status: Accepted

Solution code:
S = input()

if len(set(list(S))) > 1:
    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()
x = s[0]
flag = False
for i in range(len(s)):
  if s[i] != x:
    flag = True
    break
if flag == True:
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
sys.setrecursionlimit(10**8)
INF = float("inf")


def yes():
    print("Yes")  # type: str


def no():
    print("No")  # type: str


def solve(S: str):
    if len(set(list(S))) == 1:
        no()
    else:
        yes()
    return


def main():

    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    S = next(tokens)  # type: str
    solve(S)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
s = input()
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:
a = input()
if a=='AAA' or a=='BBB':
  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 = raw_input().strip()

ss = set()

for c in s:
  ss.add(c)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b,c=input();print('YNeos'[a==b==c::2])

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:
s1=str(input())
if "A" in s1 and "B" in s1:
  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 = list(input())
if S.count(S[0]) == 3:
  print("No")
else:
  print("Yes")

Submission status: Accepted

Solution code:
st=set([i for  i in input()])
print('No') if len(st)==1 else print('Yes')

Submission status: Accepted

Solution code:
N = input()
 
#A = map(int,input().split())
 
if N[0]==N[1]==N[2]:
    print('No')
    exit()
print('Yes')

Submission status: Accepted

Solution code:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop

def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
MOD = 10 ** 9 + 7

S = input()

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

Submission status: Accepted

Solution code:
str = input()

ct = str.count('A')

if ct == 0 or ct == 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:
# A - Station and Bus
def main():
    S = set(input().rstrip())
    print("Yes" if len(S) == 2 else "No")


if __name__ == "__main__":
    main()

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
a = str(input())

if "AB" in a  or "BA" in a:
	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 = 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.count("A") == 3 or s.count("B") == 3 else "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()
A = 0
B = 0
for i in a:
	if i == "A":
		A += 1
	if i == "B":
		B += 1
if A == 0 or B == 0:
	print("No")
else:
	print("Yes")

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

s=set(input())
print("Yes") if len(s)==2 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:
# coding: utf-8
S = set(list(input()))
print("Yes" if len(S) != 1 else "No")

Submission status: Accepted

Solution code:
s=set(input())
print("Yes") if len(s) == 2 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.count("A")==3:
  print("No")
elif S.count("B")==3:
  print("No")
else:
  print("Yes")

Submission status: Accepted

Solution code:
#n = int(input())
s = input()
#n, x= map(int,input().split())
#da = list(map(int,input().split()))
#a = [int(input()) for i in range(n)]

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = str(input())

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

Submission status: Accepted

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

Submission status: Accepted

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


main()

Submission status: Accepted

Solution code:
S=set(input())
n=len(S)
print("Yes" if n>1 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=="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:
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[0]==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=input()
li=[s[0],s[1],s[2]]
if li.count("A")==1 or li.count("A")==2:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s=input()
print('Yes' if len(set(s))!=1 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:
#!/usr/bin/env python3

import sys
import math
from bisect import bisect_right as br
from bisect import bisect_left as bl
sys.setrecursionlimit(2147483647)
from heapq import heappush, heappop,heappushpop
from collections import defaultdict
from itertools import accumulate
from collections import Counter
from collections import deque
from operator import itemgetter
from itertools import permutations
mod = 10**9 + 7
inf = float('inf')
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))

s = input()
n = len(s)
c = s.count('A')
if c == 0 or c == n:
    print('No')
else:
    print('Yes')

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

    print('No')
    
if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

    cnt_A = 0
    cnt_B = 0

    for i in range(len(S)):
        if S[i] == "A":
            cnt_A += 1
        else:
            cnt_B += 1

    if cnt_A == 3 or cnt_B == 3:
        print('{}'.format('No'))
    else:
        print('{}'.format('Yes'))


if __name__ == '__main__':
    main()

Submission status: Accepted

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

def main():
    s = input().strip()
    if s in ["AAA", "BBB"]:
        print("No")
    else:
        print("Yes")


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
S = input()
L = []
for k in S:
    L.append(k)
newL = set(L)
if len(newL) == 1:
    print('No')
else:
    print('Yes')

Submission status: Accepted

Solution code:
print('YNeos'[input() in ('AAA','BBB')::2])

Submission status: Accepted

Solution code:
stations = input()
 
print('No') if len(set(stations)) == 1 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:
import sys
input = sys.stdin.readline
s = input().strip()
if 'A' in s and 'B' in s:
    print('Yes')
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:
n =[i for i in input()]

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()
ans = "No" if len(set(s)) == 1 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:
word = input()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
Flag =  0 
S = input()
SA = [str(c) for c in S]
#A = list(['A','A','A'])
#B = list(['B','B','B'])
S1 = SA[0]
S2 = SA[1]
S3 = SA[2]
if(S1 == S2 == S3):
    print("No")
else:
    print("Yes")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()

if len(S)==3 and S.count('A')==2 or S.count('B')==2:
    print('Yes')

else:
    print('No')

Submission status: Accepted

Solution code:
def InS(): return input()


def InL(): return list(map(int, input().split()))


def InI(): return int(input())


S = input()

S_list = list(S)


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

Submission status: Accepted

Solution code:


S = input()


# moneyとtotal_priceの比較結果によって条件を分岐してください
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[0]==s[2]:
  print('No')
else:
  print('Yes')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
value = input()

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

Submission status: Accepted

Solution code:
S = input()

if len(S)==3 and S.count('A')==2 or S.count('B')==2:
    print('Yes')

else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:

S = input()

if len(S)==3 and S.count('A')==2 or S.count('B')==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:
x = input()
if x =='AAA':
  print('No')
elif x == 'BBB':
  print('No')
else:
  print('Yes')