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
input = sys.stdin.readline

def gcd(a: int, b: int):
    """ https://cocodrips.hateblo.jp/entry/2014/03/05/143623
    """
    while b:
        a, b = b, a%b
    return a

def lcm(a: int, b: int):
    return a * b // gcd(a, b)


def main():
	#N,M = map(int, input().split())
	S = input().rstrip()
	#vA = list(map(int, input().split()))
	#vX = [input().rstrip() for _ in [0,]*N]
	
	res = "No" if (S=="AAA" or S=="BBB") else "Yes"
	#res = -(-N//M)
	#res = gcd(N,M)
	print(res)
	
if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
# AtCoder Beginner Contest 157: A (2020/03/07)
S = str(input())
if S[0] == S[1] and S[1] == S[2]:
    print('No')
else:
    print('Yes')

Submission status: Accepted

Solution code:
# 入力が10**5とかになったときに100ms程度早い
import sys
read = sys.stdin.readline


def read_ints():
    return list(map(int, read().split()))


def read_a_int():
    return int(read())


def read_tuple(H):
    '''
    H is number of rows
    '''
    ret = []
    for _ in range(H):
        ret.append(tuple(map(int, read().split())))
    return ret


def read_col(H, n_cols):
    '''
    H is number of rows
    n_cols is number of cols

    A列、B列が与えられるようなとき
    '''
    ret = [[] for _ in range(n_cols)]
    for _ in range(H):
        tmp = list(map(int, read().split()))
        for col in range(n_cols):
            ret[col].append(tmp[col])

    return ret


def read_matrix(H):
    '''
    H is number of rows
    '''
    return [list(map(int, read().split())) for _ in range(H)]


def read_map(H):
    '''
    H is number of rows
    文字列で与えられた盤面を読み取る用
    '''
    return [read()[:-1] for _ in range(H)]


def read_map_as_int(H):
    '''
    #→1,.→0として読み込む
    '''
    ret = []
    for _ in range(H):
        ret.append([1 if s == '#' else 0 for s in read()[:-1]])
    return ret


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

Submission status: Accepted

Solution code:

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

Submission status: Accepted

Solution code:
S = input()

s_len = len(S)

if S.count('A') == s_len:
    print('No')
    exit()
if S.count('B') == s_len:
    print('No')
    exit()

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

Submission status: Accepted

Solution code:
S = input()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s_list = list(input())

uniq_s_list = set(s_list)

if len(uniq_s_list) > 1:
    print("Yes")
else:
    print('No')

Submission status: Accepted

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


def main():
    s = len(set(input()))

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

s = input()
s_unique = ''.join(set(s))

# print(len(s_unique))

if len(s_unique) == 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()
print('Yes') if 'A' in S and 'B' in S else print('No')

Submission status: Accepted

Solution code:
printn = lambda x: print(x,end='')
inn = lambda : int(input())
inl   = lambda: list(map(int, input().split()))
inm   = lambda:      map(int, input().split())
ins = lambda : input().strip()
DBG = True # and False
BIG = 10**18
R = 10**9 + 7

def ddprint(x):
  if DBG:
    print(x)

s = ins()
hasa = (s[0]=='A') or (s[1]=='A') or (s[2]=='A')
hasb = (s[0]=='B') or (s[1]=='B') or (s[2]=='B')
if hasa and hasb:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
S=input()

ans="No"

if S[0] != S[1]:
  ans="Yes"
elif S[0] != S[2]:
  ans="Yes"
elif S[1] != S[2]:
  ans="Yes"
  
print(ans)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
s = set(list(input()))
if len(s) == 1:
    print('No')
else:
    print('Yes')

Submission status: Accepted

Solution code:
inputstring = input()
count = 0
if len(inputstring) == 3:
  for i in inputstring:
    if i == 'A':
      count = count + 0
    else:
      count = count + 1
  if count == 0 or count == 3:
    print("No")
  else:
    print("Yes")
else:
  print()

Submission status: Accepted

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

Submission status: Accepted

Solution code:

s = input()
ans = ''

if s == 'AAA' : 
    ans = 'No'
elif s == 'BBB' :
 ans = 'No'
else :
    ans = 'Yes'

print(ans)

Submission status: Accepted

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

S = str(input())
Ans = 'Yes'

if S == 'AAA' or S == 'BBB':
    Ans = 'No'

print(Ans)

Submission status: Accepted

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

#h,w,k = [int(i) for i in read().split()]

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()

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

Submission status: Accepted

Solution code:
from sys import stdin

s = stdin.readline().rstrip()

result = "No"

if 'A' in s:
    if 'B' in s:
        result = "Yes"

print(result)

Submission status: Accepted

Solution code:
s = list(input())
print("No" if all([e == 'A' for e in s]) or all([e == 'B' for e in s]) else "Yes")

Submission status: Accepted

Solution code:
a = input()
answer = ''.join(set(a))
if (len(answer)==1):
    print("No")
else:
    print("Yes")

Submission status: Accepted

Solution code:
from sys import stdin, stdout
import math
from itertools import permutations, combinations
from collections import defaultdict
import bisect
import heapq as hq

def main():
    try:
        s=list(input())
        s=list(set(s))
        if len(s)==1:
          print('No')
        else:
          print('Yes')
       
    except:
        pass
def add(a, b, c):
    res = a + b;
    if (res >= c):return res - c;
    else:return res;
def mod(a, b, c):
    res = a * b
    if (res >= c):return res % c
    else:return res
def gcd(a, b):
    while b:
        a, b = b, a % b
    return a
def lcm(a, b):
    w = a // gcd(a, b)
    return w * b
def expo(a, b):
    x, y = 1, a
    while (b > 0):
        if (b & 1):
            x = x * y
        y = y * y
        b >>= 1
    return x
def power(a, b, m):
    x, y = 1,
    while (b > 0):
        if (b & 1):x = mod(x, y, m)
        y = mod(y, y, m)
        b >>= 1
    return x
def L():
    return list(map(int, stdin.readline().split()))
def In():
    return map(int, stdin.readline().split())
def I():
    return int(stdin.readline())
P = 1000000007


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:

n = list(input())

if n[0]=="A":
    if n[1]=="B":
        print("Yes")
    else:
        if n[2]=="B":
            print("Yes")
        else:
            print("No")
else:
    if n[1]=="A":
        print("Yes")
    else:
        if n[2]=="A":
            print("Yes")
        else:
            print("No")

Submission status: Accepted

Solution code:
n = list(input())
s = 'S'
ans = 'No'
for i in range(3):
  s = n[i]
  if i <= 1:
    if s != n[i+1]:
      ans = 'Yes'
print(ans)

Submission status: Accepted

Solution code:
s = input()

a = [0, 0]
for si in s:
    if si == 'A':
        a[0] = 1
    else:
        a[1] = 1

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#coding utf-8

S=str(input())

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

Submission status: Accepted

Solution code:
import sys

s = sys.stdin.readline().strip()

first = s[0]

same = True
for letter in s:
    if letter != first:
        same = False

if same:
    print('No')
else:
    print('Yes')

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
station = input()

if station.count('A')==3 or station.count('B')==3:
  print('No')
else:
  print('Yes')

Submission status: Accepted

Solution code:
def calculate(s):
    if s == "AAA":
        print("No")
    elif s == "BBB":
        print("No")
    else:
        print("Yes")

S = input()
calculate(S)

Submission status: Accepted

Solution code:
s = input()
flag = 0

for i in range(3):
    for j in range(3):
        if s[i] != s[j]:
            flag =1

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x = input()
for i in [0,1,2]:
    j = (i+1)%3
    if not x[i] == x[j]:
        print('Yes')
        exit()
print('No')

Submission status: Accepted

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

for s in S:
    if s == "A":
        A += 1
    else:
        B += 1
if A == 0 or B == 0:
    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:
a = list(input())
if len(set(a)) == 1:
  print("No")
else:
  print("Yes")

Submission status: Accepted

Solution code:
# coding: utf-8

s = raw_input()
print ['No', 'Yes'][len(set(s)) > 1]

Submission status: Accepted

Solution code:
str = list(input())
A = str[0]
B = str[1]
C = str[2]

ans = "No"
if A != B:
    ans = "Yes"
elif A != C:
    ans = "Yes"
elif B != C:
    ans = "Yes"


print(ans)

Submission status: Accepted

Solution code:
a = input()
al = []
for i in a:
    al.append(i)
if al[0]==al[1]==al[2]:
    print('No')
else:
    print('Yes')

Submission status: Accepted

Solution code:
S=input()
S=str(S)
if "AAA" in S:
    print("No")
elif "BBB" in S:
    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:
# coding: utf-8
import sys

#input = sys.stdin.readline
#input_line = input().split(" ")

x = input()
ans = "Yes"

if x == "AAA" or x == "BBB" :
    ans = "No"

print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8
a,  b, c = input()
if a == b and b == c:
    print('No')
else:
    print('Yes')

Submission status: Accepted

Solution code:
s = list(input())

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

Submission status: Accepted

Solution code:
# A
s = input()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S=list(raw_input())

#print S

if S[0] == 'A':
    if S[1] == 'B' or S[2] == 'B':
        print 'Yes'
    else:
        print 'No'
else:
    if S[1] == 'A' or S[2] == 'A':
        print 'Yes'
    else:
        print 'No'

Submission status: Accepted

Solution code:


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

def main():
    mod=10**9+7
    S=input()
    if S=="AAA" or S=="BBB":
        print("No")
    else:
        print("Yes")

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

if S.count('A') == len(S) or S.count('A') == 0:
    print('No')
else:
    print('Yes')

Submission status: Accepted

Solution code:
a = input()
b = a[0] + a[1]
c = a[0] + a[2]
d = a[1] + a[2]
if b == "AB" or b == "BA":
    print("Yes")
elif c == "AB" or c == "BA":
    print("Yes")
elif d == "AB" or d == "BA":
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
mogi = input()

first = mogi[0]
use_bus = False

for i in range(len(mogi)):
  if first != mogi[i]:
    use_bus = True
    break

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()

a = S[0]
b = S[1]
c = S[2]

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

Submission status: Accepted

Solution code:
station = list(input())
for i in range(2):
    if station[i] != station[i+1]:
        print("Yes")
        break
else:
    print("No")

Submission status: Accepted

Solution code:
s = str(input())

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
s = str(input())
if s.find('A') > -1 and s.find('B') > -1:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
S = input()

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

Submission status: Accepted

Solution code:
S = list(input())

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

Submission status: Accepted

Solution code:
S=input()
lens = len(S)
s = [S[i] for i in range(lens)]
a = ['A' for i in range(lens) if S[i]=='A']
b = ['B' for i in range(lens) if S[i]=='B']
if len(a)>0 and len(b)>0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = str(input())
tmp = s[0]

for c in s:
    if tmp != c:
        print("Yes")
        exit()
else:
    print("No")

Submission status: Accepted

Solution code:
a = input()
b = list(a)
hantei = "Yes"
if b[0] == b[1] and b[1] == b[2] and b[2] == b[0]:
  hantei = "No"
print(hantei)

Submission status: Accepted

Solution code:
from sys import stdin

def main():

    input = stdin.readline

    S = input()[:-1]


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

if __name__ == "__main__":
    main()

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 -*-
S = input()
print('Yes' if 'A' in S and 'B' in S else 'No')

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

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

Submission status: Accepted

Solution code:
S = input()


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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()

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

Submission status: Accepted

Solution code:

def main():

    s = input()

    result = "Yes"

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python
# coding: utf-8

def ri():
    return int(input())

def rl():
    return list(input().split())

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

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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# FileName: 	A
# CreatedDate:  2020-03-07 21:03:03 +0900
# LastModified: 2020-03-07 21:05:30 +0900
#


import os


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

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
S = input()

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

Submission status: Accepted

Solution code:
S=input();
x=("AB" in S)+("BA" in S)
print("Yes" if x>0 else "No")

Submission status: Accepted

Solution code:
s = {c for c in input()}

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()
s = S[0]
flag = 0
for i in range(1, 3):
    if s != S[i]:
        flag = 1

if flag == 1:
    print('Yes')
else :
    print('No')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = input()
c = 'No'
for i in range(2):
  if a[i] != a[i+1]:
    c = 'Yes'
    break
print(c)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x = input()
if x[0] == x[1] == x[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:
strings = list(input())
if strings[0] == strings[1] and strings[1] == strings[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:
s = set(input())
print('Yes' if len(s)>1 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:
s=input()
if s=='AAA' or s=='BBB':
    print('No')
else:
    print('Yes')

Submission status: Accepted

Solution code:
bus = input()
buses = []
for i in bus:
    buses.append(i)
ans = set(buses)
if len(ans) == 1:
    print("No")
else:
    print("Yes")

Submission status: Accepted

Solution code:
S = str(input())
c = 0
for i in range(0, 3):
    if S[i] == S[0]:
        c += 1
if c == 3:
    print('No')
else:
    print('Yes')

Submission status: Accepted

Solution code:
s=input('')
e=0
if s[0]!=s[1]:
    e=e+1

if s[1]!=s[2]:
    e=e+1

if e>=1:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
print('NYoe s'[{'A','B'} <= set(input())::2])

Submission status: Accepted

Solution code:
import sys
s = input()
bf = s[0]
for i in s[1:]:
    if i != bf:
        print("Yes")
        sys.exit()
print("No")

Submission status: Accepted

Solution code:
s = input()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a=input()
b="AAA"
c="BBB"
if a==b or a==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()

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
# 整数の入力
station = input()

#一文字ずつ取り出して反映する
if station[0] == station[1] == station[2]:
  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()

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

Submission status: Accepted

Solution code:
S = input()

a = set()
for i in range(3):
    a.add(S[i])
if len(a) == 2:
    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()

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

Submission status: Accepted

Solution code:
a = input().split()
if a == ["ABA"] or a==["BAA"] or a==["AAB"] or a==["BBA"] or a==["BAB"] or a==["ABB"]:
    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:
a,b,c = input()
k = [a,b,c]
import collections
c = collections.Counter(k)
if len(c) == 2:
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
s=input()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()

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

Submission status: Accepted

Solution code:
S = input()

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

Submission status: Accepted

Solution code:
s=input()
tmp=""
for i in s:
    if tmp != "":
        if tmp != i:
            print("Yes")
            exit()
    tmp = i
print("No")

Submission status: Accepted

Solution code:
import sys

sys.setrecursionlimit(10 ** 6)
int1 = lambda x: int(x) - 1
printV = lambda x: print(*x, sep="\n")
printH = lambda x: print(" ".join(map(str,x)))
def IS(): return sys.stdin.readline()[:-1]
def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def LI1(): return list(map(int1, sys.stdin.readline().split()))
def LII(rows_number): return [II() for _ in range(rows_number)]
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def LLI1(rows_number): return [LI1() for _ in range(rows_number)]

def main():
	S = IS()
	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':
    print('No')
elif 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:
import sys, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
# from fractions import gcd
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from functools import reduce
from bisect import bisect_left, insort_left
from heapq import heapify, heappush, heappop

INPUT = lambda: sys.stdin.readline().rstrip()
INT = lambda: int(INPUT())
MAP = lambda: map(int, INPUT().split())
S_MAP = lambda: map(str, INPUT().split())
LIST = lambda: list(map(int, INPUT().split()))
S_LIST = lambda: list(map(str, INPUT().split()))

sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7


def main():
    S = INPUT()
    print("No" if S == "A"*len(S) or S == "B"*len(S) else "Yes")


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
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 (s == "AAA" or s == "BBB"):
    print("No")
else:
    print("Yes")

Submission status: Accepted

Solution code:
s = str(input())
if s == 'AAA':
    print('No')
if s == 'BBB':
    print('No')
if s != 'AAA' and s != 'BBB':
    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 'A' not in S or 'B' not in S:
    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:
S=input()
a=S[0]
z=0
for i in range(len(S)):
    if a==S[i]:
        a=S[i]
    else:
        z=1

if z==0:
    print('No')
else:
    print('Yes')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()

sta = list(s)
b = True

for i in sta:
    if sta.count(i) == len(sta):
        b = False

if b:
    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:
sss = list(input())
mozi = sss[0]
hantei = 0
for i in range(1,len(sss)):
    if sss[i] != mozi:
        hantei = 1
        break

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

Submission status: Accepted

Solution code:
a = input()
if not (a == "AAA" or a =="BBB"):
  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:
import numpy as np
N = input()
if N=='BBB' or N=='AAA':
    print("No") 
else:
    print("Yes")

Submission status: Accepted

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

Submission status: Accepted

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

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