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().strip() ; 
s1 = set() ;

for s in S :
	s1.add ( s ) ; 

p = "Yes" if len(s1) >= 2 else "No" 
print ( p ) ;

Submission status: Accepted

Solution code:
# coding: utf-8

s = input()

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

Submission status: Accepted

Solution code:
S = input()

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

Submission status: Accepted

Solution code:
l=input()


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

Submission status: Accepted

Solution code:
# ANSHUL GAUTAM
# IIIT-D

from math import *
from copy import *
from string import *				# alpha = ascii_lowercase
from random import *				# l.sort(key=lambda l1:l1[0]-l1[1]) => ex: sort on the basis difference
from sys import stdin
from sys import maxsize
from operator import *				# d = sorted(d.items(), key=itemgetter(1))
from itertools import *
from collections import Counter		# d = dict(Counter(l))
from collections import defaultdict # d = defaultdict(list)

'''

'''

def solve(l):
	n = len(l)
	

s = list(input())
if(s.count('A') >= 1 and s.count('B') >= 1):
	print('Yes')
else:
	print('No')

Submission status: Accepted

Solution code:
S = input()
unique_n = len(set([S[0], S[1], S[2]]))

if unique_n == 1:
    ans="No"
else :
    ans = "Yes"
print(ans)

Submission status: Accepted

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

S = input()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = list(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# import bisect
# from collections import Counter, deque
# import copy
# from heapq import heappush, heappop, heapify
# from fractions import gcd
# import itertools
# from operator import attrgetter, itemgetter
# import math

import sys

# import numpy as np

ipti = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)

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

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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
S=input()
A=S[0]
flag=False
for i in S:
    if A!=i:
        flag=True

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=input()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = list(input())

a_count = 0
b_count = 0
for char in S:
    if char == 'A':
        a_count += 1
    else:
        b_count += 1

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

Submission status: Accepted

Solution code:
a = input()

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

Submission status: Accepted

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

Submission status: Accepted

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

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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys
S = input()
if S == 'AAA' or S == 'BBB':
    print('No')
    sys.exit()
print('Yes')

Submission status: Accepted

Solution code:
s = input()
print('YNeos'[s=='AAA' or s=='BBB'::2])

Submission status: Accepted

Solution code:
s = list(input())

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

Submission status: Accepted

Solution code:
import math
import string


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


def nCr(n, r):
    return math.factorial(n)//(math.factorial(n-r)*math.factorial(r))


def has_duplicates2(seq):  # リストに重複した要素があるか判定（要素にリストがある場合）
    seen = []
    for item in seq:
        if not(item in seen):
            seen.append(item)
    return len(seq) != len(seen)


def divisor(n):
    divisor = []
    for i in range(1, n+1):
        if n % i == 0:
            divisor.append(i)
    return divisor


# s = input()
# n = len(s)
# m = int(s)


# def check(l):
#     x = int("".join(list(map(str, l))))
#     return m >= x and (3 in l) and (5 in l) and (7 in l)


# def solve(l):
#     if len(l) == n:
#         if check(l):
#             # print(int("".join(list(map(str, l)))))
#             return 1
#         else:
#             return 0
#     a = solve(l+[3])
#     b = solve(l+[5])
#     c = solve(l+[7])
#     d = 0
#     if len(l) == 0 or l[-1] == 0:
#         d = solve(l+[0])
#     return a+b+c+d


# print(solve([]))

#n = readints()[0]
#
#ans = 0
#
# for i in range(n+1):
#    s = list(str(i))
#    a = s.count("3")
#    b = s.count("5")
#    c = s.count("7")
#    if a != 0 and b != 0 and c != 0 and a+b+c == len(s):
#        ans += 1
# print(ans)

s = input()

if (s[0] == 'A' and s[1] == 'A' and s[2] == 'A'):
    print("No")
    exit()
if (s[0] == 'B' and s[1] == 'B' and s[2] == 'B'):
    print("No")
    exit()

print("Yes")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()

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

Submission status: Accepted

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


if __name__ == '__main__':
    solve()

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N = input()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A = False
B = False
s=input()
for char in s:
    if char == "A":
        A = True
    if char == "B":
        B = True
if(A and B):
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = list(input())
L = list(set(N))

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
from io import StringIO
import unittest

doTest=0

def yn(n):
    if n==1:
        print("Yes")
    else:
        print("No")
    return

def resolve():
    readline=sys.stdin.readline

    #n,m,k=list(map(int, readline().strip().split()))
    #arr=list(map(int, readline().strip().split()))
    s=readline().strip()

    if s[0]==s[1] and s[0]==s[2]:
        yn(0)
    else:
        yn(1)
    #yn(n)

    return

if doTest==0:
    resolve()
    sys.exit()

Submission status: Accepted

Solution code:
s = list(input())

ans = "No"
a = s[0]
for i in s[1:]:
    if a != i:
        ans = "Yes"
    a = i

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:

S=input()

print('Yes') if(S[0]!=S[2] or S[1]!=S[2]) 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 = open(0).read()

flag = "No"
for i in range(2):
    if s[i] != s[i + 1]:
        flag = "Yes"
        
print(flag)

Submission status: Accepted

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

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


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


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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s=list(input())
cnt=0
for i in range(3):
  if s[i]=='A':
    cnt+=1
if cnt==0 or cnt==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:
S = input()

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

Submission status: Accepted

Solution code:
s = input()
dic = {"A":False,"B":False}
for c in s:
    dic[c] = True
if dic["A"] and dic["B"]:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
S=input()
b=[a for a in S]
count=0
suuji=0
for c in b:

    if c=='A':
        count+=1
    else:
        suuji+=1
if count==3 or suuji==3:
    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):
    for i in range(2):
        if S[i] != S[i+1]:
            return "Yes"
    return "No"


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

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()
c = S.count('A')
if((c==3) | (c==0)):
    print("No")
else:
    print("Yes")

Submission status: Accepted

Solution code:
line = input()

if line[0] != line[1] or line[1] != line[2] or line[0] != line[2]:
  print("Yes")
else:
  print("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]=='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();a=0;b=0
for i in range(len(s)) :
  if s[i]=="A" :
    a=a+1
  elif s[i]=="B" :
    b=b+1
if a>0 and b>0 :
  print("Yes")
else :
  print("No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()

l = set()
l.add(s[0])
l.add(s[1])
l.add(s[2])
if len(l)==2:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
def main():
    S = list(str(input()))
    if len(set(S))>1:
        print('Yes')
    else:
        print('No')

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

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

#print(S)
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
range = xrange
input = raw_input

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()
if s=="BBB" or s =="AAA":
    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:
import sys
s=list(input())

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

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:
import sys
#import math
#import numpy as np
'''a,b= map(int,input().split())'''
#a, b, c = [list(map(int, input().split())) for _ in range(3)]
#li0= [int(x) for x in input().split()]
#n,l= map(int, input().split())
#x = [list(map(int, input().split())) for _ in range(n)] 
N=str(input())
li=list(N)
i=0
for i in range(2):
  if(li[i]!=li[i+1]):
    print('Yes')
    sys.exit()
print('No')

Submission status: Accepted

Solution code:
s=list(input())
cnt = 0
for i in s:
    for j in s:
        if i != j:
            cnt +=1

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
sList = list(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()

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

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
eki = str(input())
if eki[0] == "A" and eki[1] == "A" and eki[2] == "A":
    print("No")
elif eki[0] == "B" and eki[1] == "B" and eki[2] == "B":
    print("No")
else:
    print("Yes")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input().replace('A', '')
if (not s):
  print('No')
elif (s == 'BBB'):
  print('No')
else:
  print('Yes')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = str(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=input()
if N=="AAA" or N=="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:
s=input()
print("Yes" if len(set(s))!=1 else "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:
strin= input()

a = 0
b = 0

for kk in range(3):
    if strin[kk] == "A":
        a = 1
    if strin[kk] == "B":
        b = 1

if a == 1 and b == 1:
    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,b,c=input()

if not a==b:
  print('Yes')
  exit()
elif not b==c:
  print('Yes')
  exit()
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 len(set(S)) == 2:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s=input()

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

Submission status: Accepted

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


def main():
    S = input()
    print('Yes'if 0 < S.count('A') < 3 else 'No')


if __name__ == "__main__":
    main()

Submission status: Accepted

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

sys.setrecursionlimit(10**7)
inf = 10**20
mod = 10**9 + 7

DR = [1, -1, 0, 0]
DC = [0, 0, 1, -1]

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
     
def main():
    s = S()
    if 'A' in s and 'B' in s:
        print("Yes")
    else:
        print("No")


main()

Submission status: Accepted

Solution code:
# li = [[0] * 4 for i in range(3)]

# A = list.map(int, input().split())


A = input()

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

Submission status: Accepted

Solution code:
S=input()

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

Submission status: Accepted

Solution code:
# 文字列の入力
s = input()
if s == "AAA" or s == "BBB":
  print("No")
else:
  print("Yes")

Submission status: Accepted

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

    flag = False

    for i in range(1,len(S)):
        if(S[i] != S[i-1]):
            print('Yes')
            flag = True
            break

    if(not flag):
        print('No')

if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = list(input())

for i in range(len(a)-1):
    if a[0]  != a[i+1]:
        print("Yes")
        break
    elif i == len(a)-2:
        print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    S = input()
    if S[0] == S[1] and S[1] == S[2]:
        print('No')
        return
    print('Yes')
    
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
ss = input()
ss = [x for x in ss]

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = input()
count_A = 0
count_B = 0
for i in range(0,3):
    if a[i] == "A":
        count_A += 1
    if a[i] == "B":
        count_B += 1

if count_A == 3 or count_B == 3:
    print("No")
else:
    print("Yes")

Submission status: Accepted

Solution code:
s=input()
n=len(s)

cnta=0
cntb=0

for i in range(n):
    if s[i]=='A':
        cnta+=1
    else:
        cntb+=1

if cnta>0 and cntb>0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s=input()
a=['Yes','No']
print(a[s.count('A')==3 or s.count('B')==3])

Submission status: Accepted

Solution code:
if __name__ == '__main__':
    bus = [a.strip() for a in input()]
    if bus == ['B','B','B'] or bus == ['A','A','A']:
        print('No')
    else:
        print('Yes')

Submission status: Accepted

Solution code:
S = ''.join(set(input()))

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

Submission status: Accepted

Solution code:
n=input().split()
if n[0]=='AAA' or n[0]=='BBB':
    print('No')
else:
    print('Yes')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    ary = list(input())
    if ary.count(ary[0]) == 3:
        print('No')
    else:
        print('Yes')


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

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

Submission status: Accepted

Solution code:
s = input()
pre = s[0]
for a in s[1:]:
  if pre != a:
    print("Yes")
    exit()
  pre = a
print("No")

Submission status: Accepted

Solution code:
a = str(input())
if a[0] == a[1] == a[2]:
    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")
else:
    print("No")

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

Submission status: Accepted

Solution code:
lis = input()

i = lis[0]
k = lis[1]
j = lis[2]

if i==j and j==k:
  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')
elif 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()
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()

ini = s[0]
for str in s:
    if str != ini:
        print("Yes")
        exit(0)
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()
t=[]
for i in s:
  t.append(i)
  
if len(set(t))==1:
  print("No")
else:
  print("Yes")

Submission status: Accepted

Solution code:
S = set(list(input()))
if len(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:
list_n = input()
list_n = list(list_n)
ans = "No"
for i in range(2):
    if list_n[i] != list_n[i+1]:
        ans = "Yes"

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S=input()
import sys
for i in range(2):
  if S[i]==S[i+1]:
    continue
  else:
    print('Yes')
    sys.exit()
print('No')

Submission status: Accepted

Solution code:
s = input()

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = 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:
STR = input().split()
if STR ==["AAA"] or STR == ["BBB"]:
    print("No")
else:
    print("Yes")

Submission status: Accepted

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

Submission status: Accepted

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

S = input()

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

Submission status: Accepted

Solution code:
n = input()
cnt = 0

for i in n:
    if i == "A":
        cnt += 1

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

Submission status: Accepted

Solution code:

A=list(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = str(input())

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

Submission status: Accepted

Solution code:
s=list(input())
if all(i=="A" for i in s):
    print("No")
elif all(i=="B" for i in s):
    print("No")
else:
    print("Yes")

Submission status: Accepted

Solution code:
seq=input()
a=0
b=0
for i in range(3):
    if seq[i]=="A":
        a+=1
    else:
        b+=1
if a>=1 and b>=1:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
X = input()
a, b = 0, 0
for i in range(len(X)):
	if X[i] == "A":
		a += 1
	else:
		b += 1
if a == 3 or b == 3:
	print("No")
else:
	print("Yes")

Submission status: Accepted

Solution code:
# ABC158 A
s=input()

if s.count('A')==3 or s.count('B')==3:
    print('No')
else:
    print('Yes')
# if s[0]=='A' and s[2]=='A':
#     print('Yes')
# elif s[0]=='B' and s[2]=='B':
#     print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s=input()

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

Submission status: Accepted

Solution code:
x = str(input())

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

Submission status: Accepted

Solution code:

import glob


# 問題ごとのディレクトリのトップからの相対パス
REL_PATH = 'ABC\\158\\A'

# テスト用ファイル置き場のトップ
TOP_PATH = 'C:\\AtCoder'

class Common:

    problem = []
    index = 0

    def __init__(self, rel_path):
        self.rel_path = rel_path

    def initialize(self, path):
        file = open(path)
        self.problem = file.readlines()
        self.index = 0
        return

    def input_data(self):
        try:
            IS_TEST
            self.index += 1
            return self.problem[self.index-1]

        except NameError:
            return input()

    def resolve(self):
        pass

    def exec_resolve(self):
        try:
            IS_TEST
            for path in glob.glob(TOP_PATH + '\\' + self.rel_path + '/*.txt'):
                print("Test: " + path)
                self.initialize(path)
                self.resolve()
                print("\n\n")
        except NameError:
            self.resolve()


class Solver(Common):

    def resolve(self):

        N = self.input_data()

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


solver = Solver(REL_PATH)
solver.exec_resolve()

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()
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:
if __name__ == '__main__':
    a = input()
    anum = 0

    for i in a:
        if i =="A":
            anum = anum +1

    if anum == 0 or anum ==3:
        print("No")
    else:
        print("Yes")

Submission status: Accepted

Solution code:
from sys import stdin


def main():
    S = stdin.readline().rstrip()
    if S == 'AAA' or S == 'BBB':
        print('No')
    else:
        print('Yes')


if __name__ == "__main__":
    main()