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

Submission status: Accepted

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

import sys

DEBUG = False

def solve():
    return


def read_int_list(sep = " "):
    return [int(s) for s in sys.stdin.readline().rstrip().split(sep)]

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

def dprint(*args, **kwargs):
    if DEBUG:
        print(*args, **kwargs)
    return


def main():
    chars = set(list(sys.stdin.readline().rstrip()))
    if len(chars) > 1:
        print("Yes")
    else:
        print("No")


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
s = list(input())
pre = s[0]
flag = True
for i in range(1, 3):
    if pre == s[i]:
        pass
    else:
        flag = False
    pre = s[i]
if flag:
    print("No")
else:
    print("Yes")

Submission status: Accepted

Solution code:
#!/usr/bin/python3
# -*- coding: utf-8 -*-
n = input()
if n == "AAA" or n == "BBB":
    print("No")
else:
    print("Yes")

Submission status: Accepted

Solution code:
station = input()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#coding:utf-8

import queue

def main():
    s = input()
    
    if s != 'AAA' and s != 'BBB':
        print('Yes')
    else:
        print('No')
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys
read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines

def main():
    s = readline().strip()

    if s == "BBB" or s == "AAA":
        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:
#A
#入力

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
s = input()

def a(s):
    for i, s_i in enumerate(s):
        if s_i != s[i-1]:
            return 'Yes'

    return 'No'

print(a(s))

Submission status: Accepted

Solution code:
s=input()
flag=1
if s[0]=='A':
  for i in s:
    if i=='B':
      flag*=0
else:
  for i in s:
    if i=='A':
      flag*=0
if flag==0:
  print('Yes')
else:
  print('No')

Submission status: Accepted

Solution code:
import math

S=input()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#coding:utf-8
s = input()
l = []
for i in s:
    l.append(i)

s_len = set(l)

if len(s_len) == 2:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
s = list(input())
ans = "No"
prev = s[0]
for i in s[1:]:
    if i != prev:
        ans = "Yes"
        break
    prev = i
print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
S = list(str(input()))
check = 0

for i in range(3):
  if S[i] == 'A':
    check += 1
    
if check == 0 or check == 3:
  print('No')
else:
  print('Yes')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S=input()

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

Submission status: Accepted

Solution code:
N= input()
ans = "No"
pre = ""
for i in N:
    if i != pre and pre != "":
        ans = "Yes"
    pre = i
print(ans)

Submission status: Accepted

Solution code:
from sys import stdin

S = stdin.readline().rstrip().split()
# A,B = [int(x) for x in stdin.readline().rstrip().split()]
# U = stdin.readline().rstrip().split()
#print(S)
if "AAA"==S[0]:
    print("No")
elif "BBB"==S[0]:
  	print("No")
else :
    print("Yes")

Submission status: Accepted

Solution code:
a = input()
ans = 'Yes'

if a == 'AAA' or a == 'BBB':
  ans = 'No'
  
print(ans)

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

print('No' if all(s == 'A' for s in S) or all(s == 'B' for s in S) else 'Yes')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# print('input >>')
S = input()
dic = {}

for s in S:
    dic[s] = 1

# print('-----output-----')
if len(dic) == 2:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
s = input()

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

tmp = set([a,b,c])
if(len(tmp)==1):
    print('No')
else:
    print('Yes')

Submission status: Accepted

Solution code:
s=input()
flag=True
if s[0]==s[1]==s[2]:
    flag=False

print("Yes" if flag else "No")

Submission status: Accepted

Solution code:
# abc 158
import sys
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
read = sys.stdin.buffer.read
sys.setrecursionlimit(10 ** 7)

S = readline().strip().decode('utf-8')

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

Submission status: Accepted

Solution code:
data = input()

result = 'No'

if data.find('A') >= 0:
    if data.find('B') >= 0:
        result = 'Yes'

print(result)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S= input()

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

#A11,A12,A13=list(map(lambda i:int(i),input().split()))
#integers = list(map(int,input().split()))

Submission status: Accepted

Solution code:
# input
S = input()

# process/output 
print("No" if S == "AAA" or S == "BBB" else "Yes")

Submission status: Accepted

Solution code:
s = input()

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

Submission status: Accepted

Solution code:
S=input()

pre=S[0]

ans='No'

for i in range(1,3):
    if S[i]!=pre:
        ans='Yes'
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#n = int(input())
#l = list(map(int, input().split()))

'''
A=[]
B=[]
for i in range():
    a, b = map(int, input().split())
    A.append(a)
    B.append(b)'''

#import sys
#sinput = sys.stdin.readline

n = input()
if n=="AAA" or n=="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().strip()
if S[0]==S[1] and S[0]==S[2]:
  print("No")
else:
  print("Yes")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()

sets = set(s)

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

Submission status: Accepted

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

S = input().rstrip('\r')
count = [0, 0]
for s in S:
    if (s == 'A'): count[0] = 1
    if (s == 'B'): count[1] = 1
if count[0] == 1 and count[1] == 1:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b,c=[i for i in input()]

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = list(input())


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

Submission status: Accepted

Solution code:
s = input()

company = s[0]
bus_needed = False
for i in range(1, len(s)):
    if company != s[i]:
        bus_needed = True
print("Yes" if bus_needed else "No")

Submission status: Accepted

Solution code:
s = input()

a = 0
b = 0
for x in s:
    if x == 'A':
        a += 1
    elif x == 'B':
        b += 1
if a == 3 or b == 3:
    print('No')
else:
    print('Yes')

Submission status: Accepted

Solution code:
s = input()
a_count = s.count('A')

if a_count == 0 or a_count == 3:
  print('No')
else:
  print('Yes')

Submission status: Accepted

Solution code:
L = list(input())
k = L.count("A")
if 0 < k < 3:
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
def S(): return input().rstrip()

def main():
    s = S()

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

S = input()

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

Submission status: Accepted

Solution code:
#At coder 2020/3/8 A
#import collections

S = input()

Ns=len(S)
ans='Yes'
if S=='AAA' or S=='BBB':
    ans='No'

print(ans)

Submission status: Accepted

Solution code:
# import numpy as np
# import math
# import copy
# from collections import deque
import sys
# input = sys.stdin.readline
# sys.setrecursionlimit(10000)


def main():
    S = input()

    res = 'Yes'

    if (S == 'AAA') or (S == 'BBB'):
        res = 'No'

    print(res)



main()

Submission status: Accepted

Solution code:
import sys
import math
sys.setrecursionlimit(int(1e6))

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

Submission status: Accepted

Solution code:
S = list(map(str,input()))
S_set = set(S)
print('Yes') if len(S_set) != 1 else print('No')

Submission status: Accepted

Solution code:
S=input()

SameFlag = False

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

Submission status: Accepted

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


if __name__ == '__main__':
    main()

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 'A' in S and 'B' in S:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input();

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

Submission status: Accepted

Solution code:
kanri = input()

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

Submission status: Accepted

Solution code:
S = input()

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

else:
    print('Yes')

Submission status: Accepted

Solution code:
import sys
s = set(list(sys.stdin.readline().rstrip()))

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

Submission status: Accepted

Solution code:
a = input()
if a[0] == a[1] == a[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:
def main():
    s = input()

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

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
import sys
import numpy as np

# input = sys.stdin.readline

s = input()

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

Submission status: Accepted

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

if __name__ == '__main__':
    main()

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

Submission status: Accepted

Solution code:

from sys import stdin
import sys

def getInputs():
	inputs=[]
	for line in stdin:
		line=line.split()
		inputs.append(line)
	return inputs


def main(inputs):
	s=inputs[0][0]
	if "A" in s and "B" in s:
		print("Yes")
		sys.exit(0)
	print("No")
			
		
	
	
	

if __name__=="__main__":
	inputs=getInputs()
# 	inputs=simInputs()
	main(inputs)

Submission status: Accepted

Solution code:
S = input()

ans = True
if S.count('A') == 3 or S.count('B') == 3:
    ans = False

print('Yes' if ans else 'No')

Submission status: Accepted

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

s = input()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
"""
A - Station and Bus
"""
abc = input()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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


def solve(S: str):
    allA = [s=='A' for s in S]
    allB = [s=='B' for s in S]

    if all(allA) or all(allB):
        print(NO)
    else:
        print(YES)
    return


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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s=list(input())
flagS = s[0]
flag=0
for i in range(1,3):
  if flagS != s[i]:
    flag+=1
if flag==0:
  print("No")
else:
  print("Yes")

Submission status: Accepted

Solution code:


S=input()                                               # 1行1列

bl = 0
sh = ' '
for i in S:
	if sh != ' ' and sh != i:
		bl = 1
	sh = i

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

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

Submission status: Accepted

Solution code:
s = input()
print("No" if all(map(lambda c: c == s[0], s)) else "Yes")

Submission status: Accepted

Solution code:
#AtCoder

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

Submission status: Accepted

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

for s in S:
    sset.add(s)
    
if len(sset) == 1:
    print('No')
elif len(sset) == 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:
#ABC158A
s = str(input())
if(s != 'AAA'):
    if(s != 'BBB'):
        print('Yes')
    else:
        print('No')
else:
    print('No')

Submission status: Accepted

Solution code:
S = input()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()

len = len(set(S))

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

Submission status: Accepted

Solution code:
S = input()

flag = True
X = S[0]

for i in range(1, 3):
    if S[i] != X:
        flag = False
        
if flag:
    print("No")
else:
    print("Yes")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = list(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=="AAA" or s=="BBB" else "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:
if len(set(list(input()))) == 2:
  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 = list(input())

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

Submission status: Accepted

Solution code:
s = input()
if s in ['A'*3, 'B'*3]:
    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=raw_input()
if "A" in S and "B" in S: 
    print "Yes" 
else:
    print "No"

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
 
import math
import itertools
import sys
import copy
#import numpy as np
 
# 入力
#A, B, C, D = map(int, input().split())
#L = list(map(int, input().split()))
#S = list(str(input()))
#N = int(input())
S = str(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[1] == S[2] == S[0]:
  print("No")
else:
  print("Yes")

Submission status: Accepted

Solution code:
# 2020/03/07
# AtCoder Beginner Contest 158 - A

# Input
a = input()

# Calc
if a[0] == a[1] and a[1] == a[2]:
    ans = "No"
else:
    ans = "Yes"

# Output
print(ans)

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:
import numpy as np
S = str(input().split())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S=input()

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

Submission status: Accepted

Solution code:
import sys

sys.setrecursionlimit(10 ** 6)
int1 = lambda x: int(x) - 1
p2D = lambda x: print(*x, sep="\n")
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 LLI(rows_number): return [LI() for _ in range(rows_number)]
def SI(): return sys.stdin.readline()[:-1]

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

main()

Submission status: Accepted

Solution code:
N = list(input())
a = N.count('A')
if a == 1 or a == 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 = set(input())
print('Yes') if len(S) == 2 else print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()

if len(s) == s.count("A") or len(s) == s.count("B"):
  print("No")
else:
  print("Yes")

Submission status: Accepted

Solution code:
n = input()
if (n[0]=='A' and n[1]=='A' and n[2]=='A') or(n[0]=='B' and n[1]=='B' and n[2]=='B')  :
  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')
main()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# /usr/bin/env python3


def judge(s):
    return s != "AAA" and s != "BBB"


def main():
    s = input()
    print("Yes" if judge(s) else "No")


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

s = input().strip()

def cond():
    if s == 'AAA' or s == 'BBB':
        return False
    else:
        return True

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

Submission status: Accepted

Solution code:
def main():
    from collections import Counter

    n = list(str((input())))
    dic = Counter(n)
    if len(dic) == 1:
        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:
a = input()
if(a == "AAA" or a == "BBB"):
    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=set(input())
print("Yes" if len(S)==2 else "No")

Submission status: Accepted

Solution code:
import itertools
import sys
import math
import numpy as np
from collections import deque
from itertools import combinations
from functools import reduce
from functools import lru_cache
sys.setrecursionlimit(10**9)

def main():
    S = input()
    f = S[0] == S[1] == S[2]

    print("No" if f else "Yes")




if __name__ == "__main__":
  main()

Submission status: Accepted

Solution code:
# /usr/bin/python3
# -*- coding: utf-8 -*-
from queue import Queue
from queue import LifoQueue as Stack
from math import sqrt, floor, ceil, log2
from fractions import gcd
from itertools import permutations, combinations
from operator import itemgetter
from functools import cmp_to_key



__MOD__=(10**9)+7
yn = 'YNeos'
judge = False
cnt = 0
ans = None


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

def intinput():
    return int(input())

def mulinputs():
    return map(int,input().split())

def lineinputs(func=intinput):
    datas = []
    while True:
        try:
            datas.append(func())
        except EOFError:
            break
    return datas

class ModInt():
    def __init__(self, x):
        self.__x = (x % __MOD__)
    def __add__(self, other):
        if type(other) == int:
            other = self.__class__(other)
            return int(self.__class__((self.__x + other.__x)%__MOD__))
        elif type(other) == ModInt:
            return self.__class__((self.__x + other.__x)%__MOD__)
        else:
            raise Exception("Not Int or Not ModInt")
    def __sub__(self, other):
        if type(other) == int:
            other = self.__class__(other)
            return int(self.__class__((self.__x - other.__x)%__MOD__))
        elif type(other) == ModInt:
            return self.__class__((self.__x - other.__x)%__MOD__)
        else:
            raise Exception("Not Int or Not ModInt")
    def __mul__(self, other):
        if type(other) == int:
            other = self.__class__(other)
            return int(self.__class__((self.__x * other.__x)%__MOD__))
        elif type(other) == ModInt:
            return self.__class__((self.__x * other.__x)%__MOD__)
        else:
            raise Exception("Not Int or Not ModInt")
    def __truediv__(self, other):
        if type(other) == int:
            other = self.__class__(other)
            return int(self.__class__((self.__x * other.__modinv())%__MOD__))
        elif type(other) == ModInt:
            return self.__class__((self.__x * other.__modinv())%__MOD__)
        else:
            raise Exception("Not Int or Not ModInt")
    def __pow__(self, other):
        if type(other) == int:
            other = self.__class__(other)
            return int(self.__class__(pow(self.__x, other.__x, __MOD__)))
        elif type(other) == ModInt:
            return self.__class__(pow(self.__x, other.__x, __MOD__))
        else:
            raise Exception("Not Int or Not ModInt")
    def __modinv(self, m=__MOD__):
        a = self.__x
        if a == 0:
            raise ZeroDivisionError()
        if gcd(a, m) != 1:
            raise Exception("%sの逆数は求まりません。" % a)
        b, u, v = m, 1, 0
        while b != 0:
            t = a//b;
            a -= t*b
            a, b = b, a
            u -= t * v
            u, v = v, u
        u %= m
        if u < 0:
            u += m
        return u
    def __int__(self):
        return self.__x



if __name__ == '__main__':
    S = input()
    if len(list(filter(lambda x : x=='A', S))) == 3:
        print ('No')
    elif len(list(filter(lambda x : x=='A', S))) == 0:
        print ('No')
    else:
        print('Yes')

Submission status: Accepted

Solution code:
S = input()

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

Submission status: Accepted

Solution code:
S = input()
s1 = S[0]
s2 = S[1]
s3 = S[2]

if s1 == s2 and s2 == s3:
    print("No")
else:
    print("Yes")

Submission status: Accepted

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

S = input().strip()

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

Submission status: Accepted

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

t = s[0]
ans = 'No'
for i in range(len(s)):
    if s[i] != t:
        ans = 'Yes'

print(ans)

Submission status: Accepted

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

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


def solve(S: str):
    if "AAA" in S or "BBB" in S:
        print(NO)
    else:
        print(YES)

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

Submission status: Accepted

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

import sys
import math


debug = False

def log(text):
    if debug:
        print(text)

def parse_input(lines_as_string = None):

    global debug
    lines = []
    if lines_as_string is None:
        debug = False
        # for line in sys.stdin:
        #     lines.append(line)
        lines.append(input())
    else:
        debug = True
        lines = [e for e in lines_as_string.split("\n")][1:-1]

    s = lines[0]

    return (s, )


def solve(s):
    
    
    result = 'Yes'
    if s == 'AAA' or s == 'BBB':
        result = 'No'

    return result
    


def main():
    # 出力
    result = solve(*parse_input())
    if isinstance(result, list):
        for r in result:
            print("%s" % r, sep='')
    else:
        print("%s" % result, sep='')

if __name__ == '__main__':

    main()

Submission status: Accepted

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