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()
if len(S) == S.count('A') or len(S) == S.count('B'):
	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:
n = len(set(input()))

print('Yes' if n != 1 else 'No')

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys
print('Yes' if len(set(sys.stdin.read().strip())) >= 2 else 'No')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()
companies = {company for company in S}
if len(companies) > 1:
    print('Yes')
else:
    print('No')

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

Submission status: Accepted

Solution code:
d = list(input())

s = {i for i in d}

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

Submission status: Accepted

Solution code:
S = input()

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

Submission status: Accepted

Solution code:
s = str(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:
#!/usr/bin/env python3
from collections import defaultdict, Counter
from itertools import product, groupby, count, permutations, combinations
from math import pi, sqrt
from collections import deque
from bisect import bisect, bisect_left, bisect_right
from string import ascii_lowercase
from functools import lru_cache
import sys
sys.setrecursionlimit(10000)
INF = float("inf")
YES, Yes, yes, NO, No, no = "YES", "Yes", "yes", "NO", "No", "no"
dy4, dx4 = [0, 1, 0, -1], [1, 0, -1, 0]
dy8, dx8 = [0, -1, 0, 1, 1, -1, -1, 1], [1, 0, -1, 0, 1, 1, -1, -1]


def inside(y, x, H, W):
    return 0 <= y < H and 0 <= x < W


def ceil(a, b):
    return (a + b - 1) // b


def sum_of_arithmetic_progression(s, d, n):
    return n * (2 * s + (n - 1) * d) // 2


def gcd(a, b):
    if b == 0:
        return a
    return gcd(b, a % b)


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


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


def main():
    solve()


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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:
# -*- coding: utf-8 -*-

def main():

    S = input()
    listS = S.split()

    if S[0] == S[1] and S[1] == S[2]:
        ans = 'No'

    else:
        ans = 'Yes'

    print(ans)


if __name__ == "__main__":
    main()

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

Submission status: Accepted

Solution code:
S = input()
ans = 0
for i in range(3):
  if S[i] == "A":
    ans += 1

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
s = set(input())

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

Submission status: Accepted

Solution code:
# A Station and Bus

S = input()

bef = S[0]
for s in S[1:]:
  if s != bef:
    print("Yes")
    exit()
  else:
    bef = s
print("No")

Submission status: Accepted

Solution code:
from collections import defaultdict, deque
import sys, heapq, bisect, math, itertools, string, queue, copy, time
from fractions import gcd
import numpy as np
sys.setrecursionlimit(10**8)
INF = float('inf')
MOD = 10**9+7
EPS = 10**-7

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

print(ans)

Submission status: Accepted

Solution code:
S=input()
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:
N=input()
if  all(n=='A'  for n in N):
  print('No')
elif all(n=='B' for n in N):
  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' if len(set(s)) > 1 else 'No')

Submission status: Accepted

Solution code:
str = input()

if str.count("A") in [0, 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 'A' in s and 'B' in s:
  print('Yes')
else:
  print('No')

Submission status: Accepted

Solution code:
s = list(input())

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

else:
    print('Yes')

Submission status: Accepted

Solution code:
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:
#!/usr/bin/env python3
# Generated by https://github.com/kyuridenamida/atcoder-tools
from typing import *
import collections
import functools
import itertools
import math
import sys

INF = float('inf')
YES = "Yes"  # type: str
NO = "No"  # type: str


def solve(S: str):
    return [YES, NO][S[0] == S[1] == S[2]]


def main():

    sys.setrecursionlimit(10 ** 6)

    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    S = next(tokens)  # type: str
    print(f'{solve(S)}')


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#k = int(input())
#s = input()
#a, b = map(int, input().split())
#l = list(map(int, input().split()))


s = input()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# abc158_a.py
# https://atcoder.jp/contests/abc158/tasks/abc158_a

# A - Station and Bus /
# 実行時間制限: 2 sec / メモリ制限: 1024 MB
# 配点 : 100点

# 問題文
# AtCoder 市には 3つの駅があり、1,2,3の番号がつけられています。
# これらの駅は、それぞれ鉄道会社A, Bのいずれかが管理しています。
# 管理状況は長さ 3の文字列 S で表され、駅 i は Siが A のとき鉄道会社 A が、B のとき鉄道会社 B が管理しています。
# 鉄道会社 A が管理している駅と、鉄道会社 B が管理している駅の間には、交通の便のためにバスを運行することになりました。
# 実際にバスが運行することになる駅の組み合わせが存在するかどうかを判定してください。

# 制約
#     Sは A または B から成る
#     |S|=3

# 入力
# 入力は以下の形式で標準入力から与えられる。
# S

# 出力
# バスが運行することになる駅の組み合わせが存在する場合は Yes を、存在しない場合は No を出力せよ。

# 入力例 1
# ABA

# 出力例 1
# Yes

# 駅 1,3は鉄道会社 A が、駅 2は鉄道会社 B が管理しています。
# 駅 1,2間と駅 2,3間でバスが運行するので、Yes を出力してください。

# 入力例 2
# BBA

# 出力例 2
# Yes

# 駅 1,2は鉄道会社 B が、駅 3は鉄道会社 A が管理しています。
# 駅 1,3間と駅 2,3間でバスが運行するので、Yes を出力してください。

# 入力例 3
# BBB

# 出力例 3
# No

# 駅は全て鉄道会社 B が管理しているので、バスは運行しません。よって No を出力してください。


global FLAG_LOG
FLAG_LOG = False


def log(value):
    # FLAG_LOG = True
    # FLAG_LOG = False
    if FLAG_LOG:
        print(str(value))


def calculation(lines):
    S = lines[0]
    # N = int(lines[0])
    # N, M = list(map(int, lines[0].split()))
    # values = list(map(int, lines[1].split()))
    # values = list(map(int, lines[2].split()))
    # values = list()
    # for i in range(N):
    #     values.append(int(lines[i]))
    # valueses = list()
    # for i in range(N):
    #     valueses.append(list(map(int, lines[i+1].split())))

    if S == 'AAA' or S == 'BBB':
        result = 'No'
    else:
        result = 'Yes'

    return [result]


# 引数を取得
def get_input_lines(lines_count):
    lines = list()
    for _ in range(lines_count):
        lines.append(input())
    return lines


# テストデータ
def get_testdata(pattern):
    if pattern == 1:
        lines_input = ['ABA']
        lines_export = ['Yes']
    if pattern == 2:
        lines_input = ['BBA']
        lines_export = ['Yes']
    if pattern == 3:
        lines_input = ['BBB']
        lines_export = ['No']
    return lines_input, lines_export


# 動作モード判別
def get_mode():
    import sys
    args = sys.argv
    global FLAG_LOG
    if len(args) == 1:
        mode = 0
        FLAG_LOG = False
    else:
        mode = int(args[1])
        FLAG_LOG = True
    return mode


# 主処理
def main():
    import time
    started = time.time()
    mode = get_mode()
    if mode == 0:
        lines_input = get_input_lines(1)
    else:
        lines_input, lines_export = get_testdata(mode)

    lines_result = calculation(lines_input)

    for line_result in lines_result:
        print(line_result)

    # if mode > 0:
    #     print(f'lines_input=[{lines_input}]')
    #     print(f'lines_export=[{lines_export}]')
    #     print(f'lines_result=[{lines_result}]')
    #     if lines_result == lines_export:
    #         print('OK')
    #     else:
    #         print('NG')
    # finished = time.time()
    # duration = finished - started
    # print(f'duration=[{duration}]')


# 起動処理
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
s = input()
print("No" if s in ["AAA", "BBB"] else "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 = list(input())
if "A" in s and "B" in s:
  print("Yes")
else:
  print("No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
l=list()

l=list(map(str,input()))
ac=0
bc=0
for i in range(len(l)):
    if l[i] =='A':
        ac+=1
    else:
        bc+=1

if ac==0 or bc==0:
    print('No') 
else:
    print('Yes')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
S = input()

if not ( len(S) == 3 and ( "A" in S or "B" in S)): sys.exit()

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

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

Submission status: Accepted

Solution code:
S=input()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#Macで実行する時
import sys
import os
if sys.platform=="darwin":
	base = os.path.dirname(os.path.abspath(__file__))
	name = os.path.normpath(os.path.join(base, '../atcoder/input.txt'))
	sys.stdin = open(name)

l = list(input())
#print(l)
set_l = set(l)
if len(set_l)==1:
    print("No")
else:
    print("Yes")

Submission status: Accepted

Solution code:
s = input()
print('Yes' if s!='AAA' and s!='BBB' 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:
St = len(set(input()))

print('Yes' if St == 2 else 'No')

Submission status: Accepted

Solution code:
def station_and_bus():
    # 入力
    S = input()
    # 判別処理
    if 'A' in S and 'B' in S:
        return 'Yes'
    else:
        return 'No'

result = station_and_bus()
print(result)

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[0] == S[1] and S[1] == S[2] and S[2] == S[0]:
  print("No")
else:
  print("Yes")

Submission status: Accepted

Solution code:
print(' NYoe s'[len(set(input()))::2])

Submission status: Accepted

Solution code:
print('NYoe s'[len(set(input()))==2::2])

Submission status: Accepted

Solution code:
print("No" if len(set(input()))==1 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()

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

Submission status: Accepted

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


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


def MI(): return map(int, sys.stdin.readline().split())


def LI(): return list(map(int, sys.stdin.readline().split()))


def main():
    N = input()

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


main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input().split()
x1=s[0][0]
x2=s[0][1]
x3=s[0][2]
flag = False
A = 'A'
B = 'B'
if x1==A and x2==A and x3==A:
    flag = True
elif x1==B and x2==B and x3==B:
    flag = True
else:
    flag = False
if (flag):
    result = 'No'
else:
    result = 'Yes'
print(result)

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

Submission status: Accepted

Solution code:
word = input()

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
s=input().rstrip()
if len(set(s))>1:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = list(input())
bus = "No"
if ("A" in S)&("B" in S):
    bus = "Yes"
print(bus)

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" if len(set(S)) != 1 else "No")

Submission status: Accepted

Solution code:
S = input()

ans = 'Yes'

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()
print("No" if s == "AAA" or s == "BBB" else "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:
print('NYoe s'['AAA'<input()<'BBB'::2])

Submission status: Accepted

Solution code:
print('Yes' if 'AAA'<input()<'BBB' else 'No')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()
q = min(s.count('A'),s.count('B'))

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input().strip()
if s == 'AAA' or s == '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:
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 = input()

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

if s.count("A") == 0 or s.count("B") == 0:
    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/env python3
s = input()
print("No " if s == "AAA" or s == "BBB" else "Yes")

Submission status: Accepted

Solution code:
line = list(input())
line.sort()
if line[0] == line[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:
if len(set(list(input())))==1:print('No')
else:print('Yes')

Submission status: Accepted

Solution code:
S=input()
l = ['AAA','BBB']

if S in l:
    print('No')
if S not in l:
    print('Yes')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60
MOD = 1000000007


def main():
    S = readline().strip()
    
    if S in ('AAA', 'BBB'):
        print('No')
    else:
        print('Yes')
    
    return


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

Submission status: Accepted

Solution code:
S = input()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

s = input().rstrip()

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:
L = set(list(input()))
if len(L) == 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:
s = list()

S = input()

s = S

if s[0]!=s[1] or s[1]!=s[2] or s[2]!=s[1]:
    print('Yes')

else:
    print('No')

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = list(input())
if S.count('A') == 3 or S.count('A') == 0:
    print('No')
else:
    print('Yes')

Submission status: Accepted

Solution code:
S = str(input())

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

Submission status: Accepted

Solution code:
S = input()
print('Yes' if 'A' in S and 'B' in S else '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:
S = input()
if S.count('A') == 3 or S.count('B') == 3:
    print("No")
else:
    print("Yes")

Submission status: Accepted

Solution code:
# n, k = map(int, input().split())
# from collections import OrderedDict
# d = OrderedDict()
# a = list(input().split())
# b = list(map(int, input().split()))
# print(r + max(0, 100*(10-n)))
# print("Yes" if 500*n >= k else "No") 
# s = input()
# a = int(input())
# b = int(input())
# c = int(input())
s = input()
print("Yes" if ('A' in s and 'B' in s) else "No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()

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

Submission status: Accepted

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

if len(S) == 1:
    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:
print('YNeos'[len({*input()})<2::2])

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

Submission status: Accepted

Solution code:
print("Yes" if len(set(list(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:
A = input()

if not A[0] == A[1] == A[2]:
  print("Yes")
elif A[0] == "A" or "B" and A[1] == "A" or "B" and A[2] == "A" or "B":
  print("No")

Submission status: Accepted

Solution code:
station=input()

flg="No"
for i in range(2):
    if station[i]!=station[i+1]:
        flg="Yes"

print(flg)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S=list(input())
countA=0
countB=0
for i in range(3):
    if S[i]=="A":
        countA+=1
    else:
        countB+=1
if countA!=0 and countB!=0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s=input()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
print(['No','Yes'][len(set(input()))-1])

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

prev = s[0]
for i in range(1, 3):
    if s[i] != prev:
        print('Yes')
        break
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' or S == 'BBB':
    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:
#

import sys
input=sys.stdin.readline

def main():
    S=input()
    if "BA" in S or "AB" in S:
        print("Yes")
    else:
        print("No")
    
    
    
if __name__=="__main__":
    main()

Submission status: Accepted

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

if(s == 'AAA' or s == 'BBB'):
    ans = 'No'

print(ans)

Submission status: Accepted

Solution code:
s = input()
a = set()
for x in s:
    a.add(x)
if len(a) == 1:
    print('No')
else:
    print('Yes')

Submission status: Accepted

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