Problem:


Score : 100 points

Problem Statement

In AtCoder City, there are three stations numbered 1, 2, and 3.

Each of these stations is operated by one of the two railway companies, A and B. A string S of length 3 represents which company operates each station. If S_i is A, Company A operates Station i; if S_i is B, Company B operates Station i.

To improve the transportation condition, for each pair of a station operated by Company A and one operated by Company B, there will be a bus service connecting them.

Determine if there is a pair of stations that will be connected by a bus service.

Constraints

Each character of S is A or B.

|S| = 3

Input

Input is given from Standard Input in the following format:

S

Output

If there is a pair of stations that will be connected by a bus service, print Yes; otherwise, print No.

Sample Input 1

ABA

Sample Output 1

Yes

Company A operates Station 1 and 3, while Company B operates Station 2.

There will be a bus service between Station 1 and 2, and between Station 2 and 3, so print Yes.

Sample Input 2

BBA

Sample Output 2

Yes

Company B operates Station 1 and 2, while Company A operates Station 3.

There will be a bus service between Station 1 and 3, and between Station 2 and 3, so print Yes.

Sample Input 3

BBB

Sample Output 3

No

Company B operates all the stations. Thus, there will be no bus service, so print No.



Sample input:
ABA


Sample output:
Yes

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(700000)

def s_in():
    return input()

def n_in():
    return int(input())

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

def print_l(l):
    print(' '.join(map(str, l)))

class Interval():
    def __init__(self, li):
        self.li = li
        self.n = len(li)
        self.sum_li = [li[0]]
        for i in range(1, self.n):
            self.sum_li.append(self.sum_li[i-1] + li[i])

    def sum(self, a, b=None):
        if b is None:
            return self.sum(0, a)

        res = self.sum_li[min(self.n-1, b-1)]
        if a > 0:
            res -= self.sum_li[a-1]
        return res

s = s_in()

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

Submission status: Accepted

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

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 = input()
if a==b==c:
    print('No')
else:
    print('Yes')

Submission status: Accepted

Solution code:
import math
def main():
    S = input()
    a = 0
    b = 0
    for s in S:
        if s == "A":
            a += 1
        elif s == "B":
            b += 1
    if (a == 3) or (b == 3):
        print("No")
    else:
        print("Yes")






    return 0
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
S = input()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s=input()
S1=s[0]
S2=s[1]
S3=s[2]

if S1==S2==S3=="A":
    print("No")
elif S1==S2==S3=="B":
    print("No")
else:
    print("Yes")

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:
def resolve():
    S = input()

    S_list = list(S)

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

    print('Yes')
    return

if __name__ == "__main__":
    resolve()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
num = input()

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

print("Yes")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#A
N = str(input())
if N=='AAA' or N=='BBB':
    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:
import sys
import math
def i():return int(sys.stdin.readline().replace("\n",""))
def i2():return map(int,sys.stdin.readline().replace("\n","").split())
def s():return str(sys.stdin.readline().replace("\n",""))
def l():return list(sys.stdin.readline().replace("\n",""))
def intl():return [int(k) for k in sys.stdin.readline().replace("\n","").split()]
def lx():return list(map(lambda x:int(x)*-1,sys.stdin.readline().replace("\n","").split()))
def t():return tuple(map(int,sys.stdin.readline().replace("\n","").split()))

if __name__ == "__main__":pass
s = l()
s = list(set(s))
print("Yes" if len(s)==2 else "No")

Submission status: Accepted

Solution code:
s = input()
flag = True
for i in range(len(s)-1):
    if s[i] != s[i+1]:
        flag = False
if flag:
    print('No')
else:
    print('Yes')

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
# 参加回数, 表示レーティング
temp = set([s for s in input()])

# 出力
if len(temp) == 1:
    print("No")
else:
    print("Yes")

Submission status: Accepted

Solution code:
char_data = list(input())

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

Submission status: Accepted

Solution code:
n=input()
if ('AB' in n) or ('BA' in n) :
    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:
T = input()

a = 0
b = 0 
for s in T:
    if s == 'A':
        a += 1
    elif s == 'B':
        b += 1

if a == 3 or b == 3:
    print("No")
else:
    print('Yes')

Submission status: Accepted

Solution code:
S=input()

for i in range(3):
    if S[0]==S[1]==S[2]:
        print("No")
        break
    else:
        print("Yes")
        break

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

Submission status: Accepted

Solution code:
s = input()
ans = len(set(s))

if ans >= 2:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
s = input()

ans = 'No'

s = list(set(s))

if len(s) != 1:
    ans = 'Yes'

print(ans)

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

Submission status: Accepted

Solution code:
S=input()
if (S=="AAA") | (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 = list(input())
if len(set(s)) !=1:
    print("Yes")
else:
    print("No")
#a,b = map(int,input().split())
#a_L = list(map(int,input().split()))

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

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

Submission status: Accepted

Solution code:
S = list(input())

if "B" not in S or "A" not in S:
    print("No")
    exit()
print("Yes")

Submission status: Accepted

Solution code:
S = input()
count = 0
for i in range(len(S)):
    if S[0] == S[i]:
        count += 1
if count == 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:
#ABC158 A

S = input()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()

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

Submission status: Accepted

Solution code:
s=str(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np
import math as m

def main(**kwargs):
    res = "Yes"

    if S == "AAA" or S == "BBB":
        res = "No"

    return res

if __name__ == "__main__":
    cin = np.array(input().split(" "))
    S, *_ = cin

    cout = main(S=S)
    print(cout)

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

Submission status: Accepted

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

if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
S = set(input())

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

Submission status: Accepted

Solution code:
#
import sys
import math
import numpy as np
import itertools

p=input()

if p=='AAA' or p == '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:
#!/bin/bash
''':'
docker run --rm -it -v $(cd $(dirname $0) && pwd):/vo:ro pypy:3-2.4.0 \
   /bin/bash -c "pypy3 /vo/$(basename $0) < /vo/g.inp"
exit $?
'''
import sys

def _s(): return sys.stdin.readline().strip()

def main():
    a = set(c for c in _s())
    if len(a)==1: print("No")
    else: print("Yes")

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
S = input()

fa = 0
fb = 0
for i in range(3):
    if S[i] == "A":
        fa = 1
    if S[i] == "B":
        fb = 1

if fa == 1 and fb == 1:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
import numpy as np

S =str(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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


def solve(S: str):
    if len(set([S[0],S[1],S[2]])) == 1: 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
n = input()
if "AB" in n or "BA" in n:
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
s = str(input())

ans = 'No'
if 'A' in s and 'B' in s:
    ans = 'Yes'

print(ans)

Submission status: Accepted

Solution code:
input_char = input()

if input_char.count("A") and input_char.count("B"):
  print("Yes")
else:
  print("No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
string = input()
A_flag, B_flag = False, False
for i in string:
  if (i == "A"):
    A_flag = True
  else:
    B_flag = True
if (A_flag and B_flag):
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
s = input()

lis = set()
for ss in s:
    lis.add(ss)
if len(lis) == 1:
    print('No')
else:
    print('Yes')

Submission status: Accepted

Solution code:
S = input()

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

Submission status: Accepted

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


def main():
    a = input()
    ans = 'Yes'
    if a[0] == a[1] == a[2]:
        ans = 'No'
    print(ans)


main()

Submission status: Accepted

Solution code:
s_1,s_2,s_3=input()
if s_1==s_2==s_3:
  print("No")
else:
  print("Yes")

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

# c = list(map(int, input().split()))
# s = [list(map(int, list(input()))) for i in range(10)]
s = input()

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

Submission status: Accepted

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

def main():
    s = input()

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

if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# ABC158 A

s = input()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:


l = list(input())
l=set(l)
if len(l)==1:
    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 main():
    s = input()
    if s == 'AAA' or s == 'BBB':
        print('No')
    else:
        print('Yes')
main()

Submission status: Accepted

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

S = str(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x,y,z = input()

if x == y and y == z:
  print("No")
else:
  print("Yes")

Submission status: Accepted

Solution code:
import sys, bisect, math, itertools, string, queue, copy
# import numpy as np
# import scipy
from collections import Counter,defaultdict,deque
from itertools import permutations, combinations
from heapq import heappop, heappush
# input = sys.stdin.readline
sys.setrecursionlimit(10**8)
mod = 10**9+7
def inp(): return int(input())
def inpm(): return map(int,input().split())
def inpl(): return list(map(int, input().split()))
def inpls(): return list(input().split())
def inplm(n): return list(int(input()) for _ in range(n))
def inplL(n): return [list(input()) for _ in range(n)]
def inplT(n): return [tuple(input()) for _ in range(n)]
def inpll(n): return [list(map(int, input().split())) for _ in range(n)]
def inplls(n): return sorted([list(map(int, input().split())) for _ in range(n)])

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s=input()
if len(set(s))==1:
  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 = list(str(input()))
if s[0] == s[1] and s[1] == s[2]:
  print("No")
else:
  print("Yes")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()

if S not in ["AAA", "BBB"]:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
from collections import defaultdict
from collections import deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random

# List of ints
def LI(): return list(map(int, sys.stdin.readline().split()))

# Single int
def I(): return int(sys.stdin.readline())

# List, which contains Lists of chars (not strings)
def LS():return list(map(list, sys.stdin.readline().split()))

# Single List of chars (not strings)
def S(): return list(sys.stdin.readline())[:-1]

# List of "n" integers from "n" lines.
def IR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = I()
    return l
# List of "n" Lists of integers
def LIR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = LI()
    return l
def SR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = S()
    return l
def LSR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = LS()
    return l


# Runtime Complexity: O(?)
# Space Complexity: O(?)
# Solution
s = S()

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

Submission status: Accepted

Solution code:
import collections as c
import sys
input = sys.stdin.readline
ip = lambda : map(int, input().split())
mod = 10**9+7
# ##############
s = input()
if 'A' in s and 'B' in s:
    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()
a=0
for i in range(2):
  if s[i]==s[i+1]:
    a+=1
if a==2:
  print('No')
else:
  print('Yes')

Submission status: Accepted

Solution code:
import sys

S = list(sys.stdin.readline().strip())
if len(set(S)) > 1:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

if len(l) == 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:
import itertools
import math
import sys
import heapq
from collections import Counter
from collections import deque
from fractions import gcd
from functools import reduce
sys.setrecursionlimit(4100000)
from functools import lru_cache
INF = 1 << 60

#ここから書き始める
s = input()
s_set = set(s)
if len(s_set) == 1:
    print("No")
else:
    print("Yes")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = 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 = str(input())
if s == 'BBB' or s == 'AAA':
    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:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# vim:fenc=utf-8 ff=unix


def solv(S):
    if S == 'AAA' or S == 'BBB':
        return 'No'
    return 'Yes'


if __name__ == "__main__":

    S = input()
    ans = solv(S)

    print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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



if __name__ == "__main__":
    resolve()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()

now = S[0]
for i in range(1, 3):
    if now != S[i]:
        print("Yes")
        exit()

print("No")

Submission status: Accepted

Solution code:

str = input()
char_list = list(str)#文字列をリストに

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

Submission status: Accepted

Solution code:
# Problem A

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:
s = input()
a = 0
b = 0
for x in s:
    if x == 'A': a += 1
    if x == 'B': b += 1
if a == 0 or b == 0: print('No')
else: print('Yes')

Submission status: Accepted

Solution code:
s = input()

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

Submission status: Accepted

Solution code:
import math
import fractions
import bisect
import collections
import itertools
import heapq
import string
import sys
import copy
from collections import deque
sys.setrecursionlimit(10**7)
MOD = 10**9+7
def gcd(a,b):return fractions.gcd(a,b) #最大公約数
def lcm(a,b):return (a*b) // fractions.gcd(a,b) #最小公倍数
def iin(): return int(input()) #整数読み込み
def ifn(): return float(input()) #浮動小数点読み込み
def isn(): return input().split() #文字列読み込み
def imn(): return map(int, input().split()) #整数map取得
def fmn(): return map(float, input().split()) #浮動小数点map取得
def iln(): return list(map(int, input().split())) #整数リスト取得
def iln_s(): return sorted(iln()) # 昇順の整数リスト取得
def iln_r(): return sorted(iln(), reverse=True) # 降順の整数リスト取得
def fln(): return list(map(float, input().split())) # 浮動小数点リスト取得
def join(l, s=''): return s.join(l) #リストを文字列に変換
def perm(l, n): return itertools.permutations(l, n) # 順列取得
def perm_count(n, r): return math.factorial(n) // math.factorial(n-r) # 順列の総数
def comb(l, n): return itertools.combinations(l, n) # 組み合わせ取得
def comb_count(n, r): return math.factorial(n) // (math.factorial(n-r) * math.factorial(r)) #組み合わせの総数
def two_distance(a, b, c, d): return ((c-a)**2 + (d-b)**2)**.5 # 2点間の距離
def m_add(a,b): return (a+b) % MOD

def sieves_of_e(n):
    is_prime = [True] * (n+1)
    is_prime[0] = False
    is_prime[1] = False
    for i in range(2, int(n**0.5)+1):
        if not is_prime[i]: continue
        for j in range(i * 2, n+1, i): is_prime[j] = False
    return is_prime

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = str(input())

if n.count("A") == 0 or n.count("A")== 3:
    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 len(set(s)) == 1:
	print("No")
else:
	print("Yes")

Submission status: Accepted

Solution code:
S = input()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    S = input()
    d = set()
    for s in S:
        d.add(s)

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

main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=[s for s in input()]
if 'A' in N and 'B' in N:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
S = list(input())

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

Submission status: Accepted

Solution code:
s = input()

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

Submission status: Accepted

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

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.count("A") == 0 or s.count("B")==0:
    print("No")
else:
    print("Yes")

Submission status: Accepted

Solution code:
import sys
import re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(str, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

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

Submission status: Accepted

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

Submission status: Accepted

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

def main():
  s = list(input().strip())
  if len(set(s)) > 1:
    print('Yes')
  else:
    print('No')
  

if __name__=='__main__':
  main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s,t,u=input()
if s==t and s==u:
  print('No')
else:
  print('Yes')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding:utf-8

import sys
import math
import time
#import numpy as np
import collections
from collections import deque
import queue
import copy
import bisect


def dfs(s, prev, pre):
  val[s] += Ope[s] + prev
  for i in G[s]:
    if(i == pre):
      continue
    dfs(i, val[s], s)

def bfs(sx, sy, n):
  que = deque([[sy,sx]])
  while que:
    y,x = que.popleft()
    for i,j in D:
      if(x+i<0 or y+j<0 or x+i>W-1 or y+j>H-1):
        continue
      dist = G[y+j][x+i]
      if(G[y+j][x+i] != "X"):
        if(type(G[y+j][x+i]) is str):
          G[y+j][x+i] = G[y][x]+1
          que.append([y+j,x+i])
        elif(dist>G[y][x]+1):
          G[y+j][x+i] = G[y][x]+1
          que.append([y+j,x+i])
        

#X = str(input()).split()
#a = [int(x) for x in input().split()]
#sys.setrecursionlimit(10**7)
#N, Q = map(int, input().split())
#G = [list(input()) for i in range(H)]

S = str(input())
ans = "Yes"

if(S=="AAA" or S=="BBB"):
  ans = "No"
  

print(ans)

Submission status: Accepted

Solution code:
s=input()
if s.count("A") == 3 or s.count("A") == 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()
k=""
for i in s:
  if k=="":
    k=i
  elif k!=i:
    k=""
    break
if k=="":
  print("Yes")
else:
  print("No")

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 ('AB' in S) | ('BA' in S):
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#A
n=input()
for i in ['A','B']:
    if not i in n:
        print('No')
        exit()
print('Yes')