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:
a = input()
if ("B" in a) & ("A" in a):
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
import unittest


class TestA(unittest.TestCase):
    def test_1(self):
        self.assertEqual(think('ABA'), 'Yes')

    def test_2(self):
        self.assertEqual(think('BBA'), 'Yes')

    def test_3(self):
        self.assertEqual(think('BBB'), 'No')


def solve():
    s = read()
    result = think(s)
    write(result)


def read():
    return read_line(n=3)


def read_int(n):
    return read_type(int, n, sep=' ')


def read_float(n):
    return read_type(float, n, sep=' ')


def read_type(t, n, sep):
    return list(map(lambda x: t(x), read_line().split(sep)))[:n]


def read_line(n=0):
    if n == 0:
        return input().rstrip()
    else:
        return input().rstrip()[:n]


def think(s):
    return 'Yes' if len(set(list(s))) == 2 else 'No'


def write(result):
    print(result)


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

Submission status: Accepted

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

for s in S:
  result.add(s)

if len(result) == 2:
  ans = 'Yes'
else:
  ans = 'No'

print(ans)

Submission status: Accepted

Solution code:
"""
    Template written to be used by Python Programmers.
    Use at your own risk!!!!
    Owned by enraged(rating - 5 star at CodeChef and Specialist at Codeforces).
"""
import sys
import bisect
import heapq
from math import *
from collections import defaultdict as dd  # defaultdict(<datatype>) Free of KeyError.
from collections import deque  # deque(list) append(), appendleft(), pop(), popleft() - O(1)
from collections import Counter as c  # Counter(list)  return a dict with {key: count}
from itertools import combinations as comb
from bisect import bisect_left as bl, bisect_right as br, bisect
# sys.setrecursionlimit(2*pow(10, 6))
# sys.stdin = open("input.txt", "r")
# sys.stdout = open("output.txt", "w")
mod = pow(10, 9) + 7
mod2 = 998244353
def data(): return sys.stdin.readline().strip()


def out(var): sys.stdout.write(var)


def l(): return list(map(int, data().split()))


def sl(): return list(map(str, data().split()))


def sp(): return map(int, data().split())


def ssp(): return map(str, data().split())


def l1d(n, val=0): return [val for i in range(n)]


def l2d(n, m, val=0): return [[val for i in range(n)] for j in range(m)]


s = data()
s = sorted(s)
if s[0] == s[2]:
    out("No")
    exit()
out("Yes")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S=list(input())

S.sort()
if S[-1]=="A" or S[0]=="B":
    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:
a=list(input())
if len(list(set(a)))>1:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s=list(input())
a=0
for i in range(3):
	if s[i]=='A':
		a+=1
if a==0 or a==3:
	print('No')
else:
	print('Yes')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
print('YNeos'[len(set(input()))<2::2])

Submission status: Accepted

Solution code:
import sys
import itertools

INF = 1001001001

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

if __name__ == "__main__":
    resolve()

Submission status: Accepted

Solution code:
from heapq import heappush,heappop,heapify
from collections import deque,defaultdict,Counter
import itertools
from functools import *
from itertools import permutations,combinations,groupby
import sys
import bisect
import string
import math
import time
import random
def Golf():
    *a,=map(int,open(0))
def S_():
    return input()
def IS():
    return input().split()
def LS():
    return [i for i in input().split()]
def I():
    return int(input())
def MI():
    return map(int,input().split())
def LI():
    return [int(i) for i in input().split()]
def LI_():
    return [int(i)-1 for i in input().split()]
def NI(n):
    return [int(input()) for i in range(n)]
def NI_(n):
    return [int(input())-1 for i in range(n)]
def StoI():
    return [ord(i)-97 for i in input()]
def ItoS(nn):
    return chr(nn+97)
def LtoS(ls):
    return ''.join([chr(i+97) for i in ls])
def GI(V,E,Directed=False,index=0):
    org_inp=[]
    g=[[] for i in range(n)]
    for i in range(E):
        inp=LI()
        org_inp.append(inp)
        if index==0:
            inp[0]-=1
            inp[1]-=1
        if len(inp)==2:
            a,b=inp
            g[a].append(b)
            if not Directed:
                g[b].append(a)
        elif len(inp)==3:
            a,b,c=inp
            aa=(inp[0],inp[2])
            bb=(inp[1],inp[2])
            g[a].append(bb)
            if not Directed:
                g[b].append(aa)
    return g,org_inp
def GGI(h,w,search=None,replacement_of_found='.',mp_def={'#':1,'.':0}):
#h,w,g,sg=GGI(h,w,search=['S','G'],replacement_of_found='.',mp_def={'#':1,'.':0}) # sample usage
    mp=[1]*(w+2)
    found={}
    for i in range(h):
        s=input()
        for char in search:
            if char in s:
                found[char]=((i+1)*(w+2)+s.index(char)+1)
                mp_def[char]=mp_def[replacement_of_found]
        mp+=[1]+[mp_def[j] for j in s]+[1]
    mp+=[1]*(w+2)
    return h+2,w+2,mp,found
def bit_combination(k,n=2):
    rt=[]
    for tb in range(n**k):
        s=[tb//(n**bt)%n for bt in range(k)]
        rt+=[s]
    return rt
def show(*inp,end='\n'):
    if show_flg:
        print(*inp,end=end)
YN=['YES','NO']
Yn=['Yes','No']
 
mo=10**9+7
inf=float('inf')
l_alp=string.ascii_lowercase
u_alp=string.ascii_uppercase
#ts=time.time()
#sys.setrecursionlimit(10**7)
input=lambda: sys.stdin.readline().rstrip()
 
def ran_input():
    import random
    n=random.randint(4,16)
    rmin,rmax=1,10
    a=[random.randint(rmin,rmax) for _ in range(n)]
    return n,a

def ran_input():
    import random
    n=random.randint(4,16)
    rmin,rmax=1,10
    a=[random.randint(rmin,rmax) for _ in range(n)]
    return n,a

show_flg=False
show_flg=True


st=set(input())
print(Yn[2-len(st)])

Submission status: Accepted

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

a = input()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = list(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
i=input()
if i.count("A")==3 or i.count("B")==3:
  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()

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3 ## -*- python -*-

s = input()

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

Submission status: Accepted

Solution code:
input = input()

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

Submission status: Accepted

Solution code:
S = list(input())
a = "".join(map(str,S[0:2]))
b = "".join(map(str,S[1:3]))
ans = "No"
if a == "AB" or a == "BA":
    ans = "Yes"
if b == "AB" or b == "BA":
    ans = "Yes"
print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
s=raw_input("")
temp=temp1=0
for i in range(3):
    if (s[i]=="A"):
        temp=1
    if (s[i]=="B"):
        temp1=1
if(temp*temp1):
    print "Yes"
else:
    print "No"

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys
from fractions import gcd
from itertools import groupby as gb
from itertools import permutations as perm
from itertools import combinations as comb
from collections import Counter as C
from collections import defaultdict as dd
sys.setrecursionlimit(10**5)
def y(f):
    if f:
        print('Yes')
    else:
        print('No')
def Y(f):
    if f:
        print('YES')
    else:
        print('NO')
def Z(f):
    if f:
        print('Yay!')
    else:
        print(':(')
def ispow(n):
    if int(n**.5)**2==n:
        return True
    return False

s = input()
y(s != s[0] * 3)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin
S = list(stdin.readline().rstrip())
if len(set(S)) != 1:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S=input()

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:

S = input()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S=input()
for i in S:
    if S[0]!=i:
        print('Yes')
        exit()
print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
stations = input()
listStations = list(stations)
if len(set(listStations)) == 2:
    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:
s = input()

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

Submission status: Accepted

Solution code:
# A - Station and Bus
s=list(input())
s1=set(s)
if len(s1)==2:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
s = input()

if s=="AAA" or s == "BBB":
  print("No")
  exit()
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()
Ans = 'Yes'
if S[0] == S[1] == S[2]:
  Ans = 'No'
  
print(Ans)

Submission status: Accepted

Solution code:
N = input()
ans = 'Yes'
n0 = N[0]
count = 0
if N[0] == N[1]:
    count = count + 1
if N[1] == N[2]:
    count = count + 1
if N[0] == N[2]:
    count = count + 1
if count == 3:
    ans = 'No'
print(ans)

Submission status: Accepted

Solution code:
S=set(input())

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

Submission status: Accepted

Solution code:
s = input()
print("Yes") if len(set(s))>1 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()
fg = 0
for i in range(2):
    if s[i] != s[i+1]:
        fg = 1
if fg == 1:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
s = input()
print('NYoe s'['A' in s and 'B' in s::2])

Submission status: Accepted

Solution code:
l=input()
if l=='AAA'or l=='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 s == 'BBB' or s == 'AAA':
  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()
flag = False
for i in range(len(S)):
  if S[i] != S[0]:
    flag = True
if flag == True:
  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":
    print("No")
elif S == "BBB":
    print("No")
else:
    print("Yes")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

S=input()
print(yesno(S))

Submission status: Accepted

Solution code:
import sys


def solve():
    input = sys.stdin.readline
    mod = 10 ** 9 + 7
    s = str(input().rstrip('\n'))
    if s[0] != s[1] or s[0] != s[2] or s[1] != s[2]:
        print("Yes")
    else:
        print("No")


if __name__ == '__main__':
    solve()

Submission status: Accepted

Solution code:
S = str(input())

cnt1=0
cnt2=0
for i in S:
    if i=='A':
        cnt1+=1
    else:
        cnt2+=1
if cnt1>=1 and cnt2>=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:
t=input()
if 'AAA' in t or 'BBB' in t:
    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()
S=[1 if s=='A' else 0 for s in S]
print("No") if sum(S)==0 or sum(S)==3 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():
    char = input()
    count = 0
    chars_set = set()
    for c in char:
        if c not in chars_set:
            chars_set.add(c)
    if len(chars_set) > 1:
        print("Yes")
        return
    print("No")


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
s = list(input())

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

Submission status: Accepted

Solution code:
#input
S = input()

#output
if S == "AAA":
    print("No")
elif S == "BBB":
    print("No")
else:
    print("Yes")

Submission status: Accepted

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

from sys import stdin, stderr

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

   return 0

if __name__ == '__main__': main()

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
s = input()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
stations = input()
numA = 0
numB = 0
for station in stations:
    if station == 'A':
        numA +=1
    else:
        numB += 1
if (numA > 2 or numB > 2):
    print('No')
else:
    print('Yes')

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
S= input()
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]:
  print('Yes')
else:
  print('No')

Submission status: Accepted

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

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:
import sys

S=sys.stdin.readline()
m={}
for s in S:
    m[s] = True
if "A" in m and "B" in m:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
# https://atcoder.jp/contests/abc158/tasks/abc158_a
import sys
sys.setrecursionlimit(12345678)
import itertools
from collections import Counter
from collections import defaultdict
from collections import deque
import bisect
from heapq import heappush, heappop


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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = str(input())
if (S.count('A') == 0)or(S.count('B') == 0):
    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:
def check():
    s = input()
    value = s[0]
    if s.count(value) == 3:
        print('No')
    else:
        print('Yes')
check()

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:
s = input()
ans = 'No'
pre = s[0]
for i in s[1:]:
    if pre != i:
        ans = 'Yes'
        break
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10 ** 7)
read = sys.stdin.buffer.read 
inp = sys.stdin.buffer.readline
def inpS(): return inp().rstrip().decode()
readlines = sys.stdin.buffer.readlines 
MOD = 10**9+7

S = inpS()
ans = "No"
if S.count("A")!=3:
  if S.count("B")!=3:
    ans = "Yes"
print(ans)

Submission status: Accepted

Solution code:
import math
import numpy as np

s=input()
t=s.count("A")
if t==0 or t==3:
    print("No")
else:
    print("Yes")

Submission status: Accepted

Solution code:
s = set(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()
ok = 'A' in S and 'B' in S
if ok:
    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:
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()
topOfS = S[0]
isPass = False
for i in S:
  if topOfS != i:
    isPass = True
    break
if isPass == True:
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
str = input() # input()で入力を受け取り、それを変数strに代入
if str == 'AAA' or str == '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\n')
else:
  print('Yes\n')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#gcdは3.4.3だとfractionsにある
from fractions import gcd
import math

from math import factorial as f

from math import ceil,floor,sqrt


import bisect
import re
import heapq


from copy import deepcopy
import itertools

from sys import exit

ii = lambda : int(input())
mi = lambda : map(int,input().split())
li = lambda : list(map(int,input().split()))

yes = "Yes"
no = "No"

def main():
    s = input()
    if s == 'AAA' or s == 'BBB':
        print(no)
    else:
        print(yes)






main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# Code for A - Station and Bus
# Use input() to fetch data from STDIN

s = input()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = [x for x in raw_input()]
print 'Yes' if len(set(s)) > 1 else 'No'

Submission status: Accepted

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

Submission status: Accepted

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


def main():
    S = IS()

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


if __name__ == '__main__':
    main()