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()
same=["AAA","BBB"]
if S in same:
    print("No")
else:
    print("Yes")

Submission status: Accepted

Solution code:
chaine = input()
repA = 0
repB = 0

for i in chaine:
  if i=='A':
    repA += 1 
  else: 
    repB += 1 

if repB==3 or repA==3:
  print("No")
else:
  print("Yes")

Submission status: Accepted

Solution code:
s=input()

print("Yes") if "A" in s and "B" in s 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:

url = "https://atcoder.jp//contests/abc158/tasks/abc158_a"

def main():
    t = input()
    if 'A' in t and 'B' in t:
        print('Yes')
    else:
        print('No')


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
s = set(input())

print("Yes" if len(s)==2 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:
#!/usr/bin/env python3

import sys
# import math
# import re                                    # re.compile(pattern) => ptn obj; p.search(s), p.match(s), p.finditer(s) => match obj; p.sub(after, s)
# from collections import deque                # deque class. deque(L): dq.append(x), dq.appendleft(x), dq.pop(), dq.popleft(), dq.rotate()
# from collections import defaultdict          # subclass of dict. defaultdict(facroty)
# from collections import Counter              # subclass of dict. Counter(iter): c.elements(), c.most_common(n), c.subtract(iter)
# from heapq import heapify, heappush, heappop # built-in list. heapify(L) changes list in-place to min-heap in O(n), heappush(heapL, x) and heappop(heapL) in O(lgn).
# from heapq import nlargest, nsmallest        # nlargest(n, iter[, key]) returns k-largest-list in O(n+klgn).
# from itertools import count, cycle, repeat   # count(start[,step]), cycle(iter), repeat(elm[,n])
# from itertools import groupby                # [(k, list(g)) for k, g in groupby('000112')] returns [('0',['0','0','0']), ('1',['1','1']), ('2',['2'])]
# from itertools import starmap                # starmap(pow, [[2,5], [3,2]]) returns [32, 9]
# from itertools import product                # product(iter, repeat=n)
# from itertools import accumulate             # accumulate(iter[, f])
# from functools import reduce                 # reduce(f, iter[, init])
# from functools import lru_cache              # @lrucache ...arguments of functions should be able to be keys of dict
# from bisect import bisect_left, bisect_right # bisect_left(a, x, lo=0, hi=len(a)) returns i such that all(val<x for val in a[lo:i]) and all(val>-=x for val in a[i:hi]).
# from copy import deepcopy                    # to copy multi-dimentional matrix without reference
# from fractions import gcd                    # for Python 3.4


def main():
    mod = 1000000007                  # 10^9+7
    inf = float('inf')
    sys.setrecursionlimit(10**6)    # 1000 -> 1000000
    def input(): return sys.stdin.readline().rstrip()
    def ii():  return int(input())
    def mi():  return map(int, input().split())
    def mi_0(): return map(lambda x: int(x)-1, input().split())
    def lmi(): return list(map(int, input().split()))
    def lmi_0(): return list(map(lambda x: int(x)-1, input().split()))
    def li():  return list(input())
    
    
    s = set(li())
    print('No') if len(s) == 1 else print('Yes')

if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
s = input()

for i in range(2):
  for j in range(1, 3):
    if s[i] != s[j]:
      print('Yes')
      sys.exit()

print('No')

Submission status: Accepted

Solution code:
# coding: utf-8
S = input()
if (S[0] == S[1]) & (S[1] == S[2]):
    print('No')
else:
    print('Yes')

Submission status: Accepted

Solution code:
from collections import deque, Counter as cnt
from collections import defaultdict as dd
from operator import itemgetter as ig
from bisect import bisect_right as bsr
from math import factorial, ceil, floor
import sys
sys.setrecursionlimit(1000000)

# お約束
args = None
INF = float("inf")
MOD = int(1e9 + 7)


def input(*ps):
    if type(ps[0]) is list:
        return [input(*ps[0][:-1]) for _ in range(ps[0][-1])]
    elif len(ps) == 1:
        return ps[0](next(args))
    else:
        return [p(next(args)) for p in ps]


def nlist(n, v):
    if not n:
        return [] if type(v) is list else v
    return [nlist(n[1:], v) for _ in range(n[0])]


def yesno(v):
    print(["Yes", "No"][not v])


# エントリーポイント
def main():
    S = set(input(str))
    yesno(len(S) == 2)


if __name__ == '__main__':
    args = iter(sys.stdin.read().split())
    main()

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


def main():
    j = True

    for i in range(len(S)):
        if S[0] != S[i]:
            j = False
        else:
            continue

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




if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def Main(S):
    return "Yes" if 'A' in S and 'B' in S else "No"
    
def main():
    S = str(input())
    print(Main(S))

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin
N = list((stdin.readline().strip()))
if N[0]!=N[1] or N[1]!=N[2]:print("Yes")
else:print("No")

Submission status: Accepted

Solution code:
S = input()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

#ライブラリインポート
from collections import defaultdict

con = 10 ** 9 + 7
#入力受け取り
def getlist():
	return list(map(int, input().split()))

#処理内容
def main():
	S = list(input())
	if S.count("A") == 3 or S.count("B") == 3:
		print("No")
	else:
		print("Yes")



if __name__ == '__main__':
	main()

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 math

s = input()

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

Submission status: Accepted

Solution code:
stations = input()

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

Submission status: Accepted

Solution code:
S = input()

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

Submission status: Accepted

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

Submission status: Accepted

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

def main():
    *S, = map(str, open(0).read().split())
    S = S[0]
    if (S == "AAA" or S == "BBB"):
        print("No")
    else:
        print("Yes")


main()

Submission status: Accepted

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

  num = 0
  for i in range(len(x)):
    if(x[0] != x[i]):
      num = 1

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

Submission status: Accepted

Solution code:
def main():
    args = input().rstrip().split(' ')
    S = [c for c in args[0]]
    if(S[0]==S[1] and S[0]==S[2] and S[1]==S[2]):
        print('No')
    else:
        print('Yes')
    
if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x = input()

if x[0]==x[1]==x[2]:
  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:
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

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

Submission status: Accepted

Solution code:
bus = str(input())

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

Submission status: Accepted

Solution code:
#!/usr/bin/python3

s = input()

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

Submission status: Accepted

Solution code:
s=str(input())

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

Submission status: Accepted

Solution code:
# coding: utf-8

# 標準入力<str>
S = input()

l = []

for i in range(3):
  l.append(S[i])

s = set(l)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = list(input())

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

Submission status: Accepted

Solution code:
s=input()
z=0
for i in range(2):
  if s[i]==s[i+1]:
    z+=1
if z==2:
  print('No')
elif z<2:
  print('Yes')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8
def main():
    s = input()
    if s[0] == s[1] == s[2]:
        print("No")
    else:
        print("Yes")
if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

for s in S:
    seen.add(s)

print( 'Yes' if len(seen) == 2 else 'No' )

Submission status: Accepted

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

if a == 'B' and b == 'B' and c == 'B':
    print('No')
elif a == 'A' and b == 'A' and c == 'A':
    print('No')
else:
    print('Yes')

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = set(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
s = input()

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

else:
    print("Yes")

Submission status: Accepted

Solution code:
s = input()
l = list(s)
ans= "No"
for i in range(0,len(l)-1):
  if(l[i]!= l[i+1]):
    ans = "Yes"
    break
print(ans)

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

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

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

Submission status: Accepted

Solution code:
s = input()
print('Yes' if s[0] != s[1] or s[2] != s[1] or s[2] != s[1] else '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:
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, groupby
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
from functools import reduce
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()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
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:
s = [i for i in input()]
s0 = s[0]
for j in s[1:]:
  if s0 != j:
    print("Yes")
    exit()
  s0 = j
print("No")

Submission status: Accepted

Solution code:
s = input()
if s[0] != s[1] or s[0] != s[2] or s[1] != s[2]:
    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:
S = input()

count = [0,0]

for s in S:
    if s == "A":
        count[0] +=1
    else:
        count[1] += 1

if count[0] > 0 and count[1] > 0:
    print("Yes")

else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Sun Apr 12 20:07:56 2020

@author: Kanaru Sato
"""

s = list(input())

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

Submission status: Accepted

Solution code:
from sys import stdin

s = stdin.readline().rstrip()

count = 0
if s[0] == 'A':
    if s[1] == 'B':
        count += 1
if s[1] == 'A':
    if s[2] == 'B':
        count += 1
if s[0] == 'B':
    if s[1] == 'A':
        count += 1
if s[1] == 'B':
    if s[2] == 'A':
        count += 1
if count > 0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
S=list(input())

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

Submission status: Accepted

Solution code:
S = input()

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

Submission status: Accepted

Solution code:
S = input()
dict_st = {'A':0, 'B':0}
for i in S:
  dict_st[i]+=1

for k,v in dict_st.items():
  if v<=2 and v>0:
    print('Yes')
    break
  elif v>2:
    print('No')
    break

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x = input()
print(["Yes","No"][(x == "AAA") | (x == "BBB")])

Submission status: Accepted

Solution code:
S = input()
A = False
B = False

for s in S:
  if s == "A":
    A = True
  else:
    B = True

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S=input()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import os
import math

ii = lambda: int(sys.stdin.buffer.readline().rstrip())
il = lambda: list(map(int, sys.stdin.buffer.readline().split()))
fl = lambda: list(map(float, sys.stdin.buffer.readline().split()))
iln = lambda n: [int(sys.stdin.buffer.readline().rstrip()) for _ in range(n)]

iss = lambda: sys.stdin.buffer.readline().decode().rstrip()
sl = lambda: list(map(str, sys.stdin.buffer.readline().decode().split()))
isn = lambda n: [sys.stdin.buffer.readline().decode().rstrip() for _ in range(n)]

MOD = 10 ** 9 + 7


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

    l = list(iss())
    print('Yes' if len(set(l)) == 2 else 'No')


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()

ans = 'Yes'

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

main()

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = str(input())
flag=1
if S[0]==S[1]:
    if S[1]==S[2]:
        flag=0
if flag==1:
    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()
x = s.count('A') ; y = s.count('B')
if (x == 1 and y == 2) or (x == 2 and y == 1):
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

S = input()

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

Submission status: Accepted

Solution code:
x = input()

if x.count('A') > 0 and x.count('B') > 0:
    print('Yes')
else:
    print('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:
string = sorted(input())
print("Yes" if string[0] != string[2] else "No")

Submission status: Accepted

Solution code:
s = input()
if s.count(s[0]) == 3:
  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 "No")

Submission status: Accepted

Solution code:
# A

S=input()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()

is_bus_need = lambda S: (S != 'AAA') and (S != 'BBB')

answer = 'Yes' if is_bus_need(S) else 'No'

print(answer)

Submission status: Accepted

Solution code:
a = list(input().strip())

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

Submission status: Accepted

Solution code:
a = list(input().strip())

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

Submission status: Accepted

Solution code:
s = list(input())

s.sort()

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

Submission status: Accepted

Solution code:
S =input() #'AAA'

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
ls = list(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()
c = S.count('A') 
if c == 3 or c == 0:
  print('No')
else:
  print('Yes')

Submission status: Accepted

Solution code:
import sys


def solve():
    readline = sys.stdin.buffer.readline
    mod = 10 ** 9 + 7
    s = list(str(readline().rstrip().decode('utf-8')))
    for i in range(1, len(s)):
        if s[i] != s[i-1]:
            print("Yes")
            exit()
    print("No")


if __name__ == '__main__':
    solve()

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

Submission status: Accepted

Solution code:
S = input()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()

c0 = None
for c in S:
    if c0 is None:
        c0 = c
        continue
    
    if c != c0:
        c0 = None
        break
    
result = "Yes" if c0 is None else "No"
print(result)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
station = list(input())
message = ""

for i in range(0, len(station)-1):
    if (station[i] != station[i + 1]):
        message = 'Yes'
        break
    else:
        message = 'No'


print(message)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
K = str(input())

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

Submission status: Accepted

Solution code:
K = str(input())

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

Submission status: Accepted

Solution code:
s = input()

num = s.count("A")
if num == 0 or num == 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:
a = 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:
#--Station and Bus
S = input()

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

Submission status: Accepted

Solution code:
s = input()

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

print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = str(input())

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

Submission status: Accepted

Solution code:
S = input()

if all(i == "A" for i in S) or all(i == "B" for i in S):
    print("No")
else:
    print("Yes")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S=input()

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

Submission status: Accepted

Solution code:
# encoding:utf-8
import copy
import random
import bisect #bisect_left　これで二部探索の大小検索が行える
import fractions #最小公倍数などはこっち
import math
import sys
import collections

mod = 10**9+7
sys.setrecursionlimit(mod) # 再帰回数上限はでdefault1000

d = collections.deque()
def LI(): return list(map(int, sys.stdin.readline().split()))

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

Submission status: Accepted

Solution code:
s = list(input())
if 'A' in s and 'B' in s:
    print('Yes')
    exit()

print('No')