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:
# Author: cr4zjh0bp
# Created: Sat Mar  7 11:50:59 UTC 2020
import sys
 
stdin = sys.stdin
inf = 1 << 60
mod = 1000000007
 
ni = lambda: int(ns())
nin = lambda y: [ni() for _ in range(y)]
na = lambda: list(map(int, stdin.readline().split()))
nan = lambda y: [na() for _ in range(y)]
nf = lambda: float(ns())
nfn = lambda y: [nf() for _ in range(y)]
nfa = lambda: list(map(float, stdin.readline().split()))
nfan = lambda y: [nfa() for _ in range(y)]
ns = lambda: stdin.readline().rstrip()
nsn = lambda y: [ns() for _ in range(y)]
ncl = lambda y: [list(ns()) for _ in range(y)]
nas = lambda: stdin.readline().split()

s = ns()
ans = "No"
for i in range(len(s) - 1):
    if s[i] != s[i + 1]:
        ans = "Yes"

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()

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

Submission status: Accepted

Solution code:
S = str(input())

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
S = list(input())[: -1]
if S.count("A") % 3: 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:
# n=int(input())
# a=[int(i) for i in input().split()]
# a=[int(input()) for i in range(n)]
import math
s=input()
a=s.count("A")
if a==0 or a==3:
    print("No")
else:
    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:
s = input()
print('Yes' if len(set(list(s))) == 2 else 'No')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
print('Yes' if len(set(input()))!=1 else '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 len(set(s)) != 1:
    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 s.count("A") and s.count("B"):
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
def main():
    S = input()
    ans = "No"
    for i in range(2):
        if (S[i] != S[i+1]):
            ans = "Yes"
    print(ans)


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

Submission status: Accepted

Solution code:
S = input()
k = []
for i in range(len(S)):
    k.append(S[i])
p = set(k)
L = list(p)
if len(L) == 1:
    print("No")
else:
    print("Yes")

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import Counter,defaultdict,deque
from bisect import bisect_left
import sys,math,itertools,pprint,fractions,time
sys.setrecursionlimit(10**8)
mod = 10**9+7
INF = float('inf')
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))

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

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()
t = set(S)
if len(t)==2:
  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:
#!/usr/bin/env python
# -*- coding: utf-8 -*-


def solve(inp):
    S = inp.readline().strip()

    if S[0] == S[1] == S[2]:
        return "No"
    else:
        return "Yes"


def main():
    import sys
    result = solve(sys.stdin)
    if result is not None and result != '':
        print(result)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys

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

Submission status: Accepted

Solution code:
import math
from functools import reduce
from collections import deque
import sys
sys.setrecursionlimit(10**7)

# スペース区切りの入力を読み込んで数値リストにして返します。
def get_nums_l():
    return [ int(s) for s in input().split(" ")]

# 改行区切りの入力をn行読み込んで数値リストにして返します。
def get_nums_n(n):
    return [ int(input()) for _ in range(n)]

# 改行またはスペース区切りの入力をすべて読み込んでイテレータを返します。
def get_all_int():
    return map(int, open(0).read().split())

def log(*args):
    print("DEBUG:", *args, file=sys.stderr)

s = input()

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

Submission status: Accepted

Solution code:
# ABC158a


def main():
    import sys
    input = sys.stdin.readline
    sys.setrecursionlimit(10**6)
    # 再帰関数を使わない限りPypyで出すこと

    def dump(*args):
        sys.stderr.write(str(args))

    s = input()[:-1]
    if (len(set(s)) == 1):
        print('No')
    else:
        print('Yes')


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
S = input()

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

Submission status: Accepted

Solution code:
ans = 0
s = input()
for i in range(1, len(s)):
    if s[i] != s[i - 1]:
        ans += 1
if ans:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
s = input().rstrip()
if len(set(list(s))) == 1:
    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:
import sys


def input():
    return sys.stdin.readline()[:-1]


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


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
S = input()

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

Submission status: Accepted

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

print("Yes")

Submission status: Accepted

Solution code:
S = raw_input()

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

Submission status: Accepted

Solution code:
# import numpy as np
# import scipy as sp
# import sys
# input = sys.stdin.readline
# print(a,b,c,sep="") # 半角スペースなしで出力(abc)
# n=int(input())  #数値入力 「N」だけの入力のとき
# a,b=map(int, input().split())  #複数数値入力　「A B」みたいなスペース空いた入力のとき
# a=list(map(int, input().split()))  #リスト入力 「a1 a2 a3 ...」みたいな配列のような入力のとき
# a=[int(input()) for _ in range (n)]  #リスト入力  改行でa1 ... anのとき
# s=[list(map(str,list(input()))) for i in range(h)]  # 文字列の二次元配列入力
# s = [list(map(int, input().split())) for i in range(n)] # 数値の二次元配列入力
# a = b[:], a = [x[:] for x in b] # deepcopy
# chr(ord('a') + 1) # chrのインクリメント
# s.sort(key=lambda x: x[1], reverse=False) # 2番目の要素で昇順にソート（Trueなら降順）
#　

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
input = sys.stdin.readline

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()

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

Submission status: Accepted

Solution code:
def main():

    S = input()
    if 'A' in S and 'B' in S:
        return "Yes"
    return "No"


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

if s.count(s[0]) == 3:
    print("No")
else:
    print("Yes")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
rr = raw_input
rri = lambda: int(rr())
rrm = lambda: map(int, rr().split())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()
if s.count("A") == 3:
    print("No")
elif s.count("B") == 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:
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()  # ignore trailing spaces

s = ns()

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:
#
# 　　  ⋀_⋀　 
#　　  (･ω･)  
# .／ Ｕ ∽ Ｕ＼
#  │＊　合　＊│
#  │＊　格　＊│ 
#  │＊　祈　＊│ 
#  │＊　願　＊│ 
#  │＊　　　＊│ 
#      ￣
#
import sys
sys.setrecursionlimit(10**6)
input=sys.stdin.readline
from math import floor,sqrt,factorial,hypot,log #log2ないｙｐ
from heapq import heappop, heappush, heappushpop
from collections import Counter,defaultdict,deque
from itertools import accumulate,permutations,combinations,product,combinations_with_replacement
from bisect import bisect_left,bisect_right
from copy import deepcopy
from fractions import gcd
from random import randint
def ceil(a,b): return (a+b-1)//b
inf=float('inf')
mod = 10**9+7
def pprint(*A): 
    for a in A:     print(*a,sep='\n')
def INT_(n): return int(n)-1
def MI(): return map(int,input().split())
def MF(): return map(float, input().split())
def MI_(): return map(INT_,input().split())
def LI(): return list(MI())
def LI_(): return [int(x) - 1 for x in input().split()]
def LF(): return list(MF())
def LIN(n:int): return [I() for _ in range(n)]
def LLIN(n: int): return [LI() for _ in range(n)]
def LLIN_(n: int): return [LI_() for _ in range(n)]
def LLI(): return [list(map(int, l.split() )) for l in input()]
def I(): return int(input())
def F(): return float(input())
def ST(): return input().replace('\n', '')
def main():
    S=ST()
    if("B" in S and "A" in S):
        print("Yes")
    else:
        print("No")
if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

Submission status: Accepted

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


if __name__ == '__main__':
    main()

# import sys
#
# sys.setrecursionlimit(10 ** 7)
#
# input = sys.stdin.readline
# rstrip()
# int(input())
# map(int, input().split())

Submission status: Accepted

Solution code:
def inp():
    return input()
def iinp():
    return int(input())
def inps():
    return input().split()
def miinps():
    return map(int,input().split())
def linps():
    return list(input().split())
def lmiinps():
    return list(map(int,input().split()))
def lmiinpsf(n):
    return [list(map(int,input().split()))for _ in range(n)]

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

Submission status: Accepted

Solution code:
# import sys
# input = sys.stdin.readline
s = list(input())
if len(set(s)) == 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:
import sys
sys.setrecursionlimit(10**6)
from math import floor,ceil,sqrt,factorial,log
from heapq import heappop, heappush, heappushpop
from collections import Counter,defaultdict,deque
from itertools import accumulate,permutations,combinations,product,combinations_with_replacement
from bisect import bisect_left,bisect_right
from copy import deepcopy
from operator import itemgetter
from fractions import gcd
mod = 10 ** 9 + 7
inf = float('inf')
ninf = -float('inf')
 
#整数input
def ii(): return int(sys.stdin.readline().rstrip()) #int(input())
def mii(): return map(int,sys.stdin.readline().rstrip().split())
def limii(): return list(mii()) #list(map(int,input().split()))
def lin(n:int): return [ii() for _ in range(n)]
def llint(n: int): return [limii() for _ in range(n)]
#文字列input
def ss(): return sys.stdin.readline().rstrip() #input()
def mss(): return sys.stdin.readline().rstrip().split()
def limss(): return list(mss()) #list(input().split())
def lst(n:int): return [ss() for _ in range(n)]
def llstr(n: int): return [limss() for _ in range(n)]

#本当に貪欲法か？ DP法では？？
#本当に貪欲法か？ DP法では？？
#本当に貪欲法か？ DP法では？？

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

Submission status: Accepted

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

    return 'No' if S == 'AAA' or S == 'BBB' else 'Yes'
   

print(main())

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

Submission status: Accepted

Solution code:
def main():
    import numpy as np
    import sys
    S=sys.stdin.readline()
    if 'A' in S and 'B' in S:
        print('Yes')
    else:
        print('No')



main()

Submission status: Accepted

Solution code:
s = input()
if s.count("A") == 0 or s.count("A") == 3:
    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:
import sys

sys.setrecursionlimit(10 ** 8)

input = sys.stdin.readline


def main():
    S = input().strip()

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

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

Submission status: Accepted

Solution code:
import math
import itertools
import fractions
import heapq
import collections
import bisect
import sys
import copy

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


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

Submission status: Accepted

Solution code:
import copy

import math
import fractions

def j(n):
    if n:print("Yes")
    else:print("No")
    exit(0)
rem = 10 ** 9 + 7

"""
def ct(x,y):
    if (x>y):print("+")
    elif (x<y): print("-")
    else: print("?")
"""

def ip():
    return int(input())
def iprow():
    return [int(i) for i in input().split()]
def ips():
    return (int(i) for i in input().split())
def ipmultiplerow(n):
    a = []
    for i in range(n):
        a.append(ip())
    return a
def printrow(a):
    for i in a:
        print(i)

def lcm(x, y):
    return (x * y) // fractions.gcd(x, y)

a = input()

if a[0] == a[1] and a[1] == a[2]:
    j(0)
j(1)

Submission status: Accepted

Solution code:
#!usr/bin/env python3
from collections import defaultdict,deque
from heapq import heappush, heappop
from itertools import permutations
import sys
import math
import bisect
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def LS():return [list(x) for x in sys.stdin.readline().split()]
def S():
    res = list(sys.stdin.readline())
    if res[-1] == "\n":
        return res[:-1]
    return res
def IR(n):
    return [I() for i in range(n)]
def LIR(n):
    return [LI() for i in range(n)]
def SR(n):
    return [S() for i in range(n)]
def LSR(n):
    return [LS() for i in range(n)]

sys.setrecursionlimit(1000000)
mod = 1000000007

def solve():
    s = input()
    if s.count("A") in [0,3]:
        print("No")
    else:
        print("Yes")
    return

#Solve
if __name__ == "__main__":
    solve()

Submission status: Accepted

Solution code:
import sys
import math
from collections import defaultdict

sys.setrecursionlimit(10**7)
def input():
    return sys.stdin.readline()[:-1]

mod = 10**9 + 7

def I(): return int(input())
def LI(): return list(map(int, input().split()))
def LIR(row,col):
    if row <= 0:
        return [[] for _ in range(col)]
    elif col == 1:
        return [I() for _ in range(row)]
    else:
        read_all = [LI() for _ in range(row)]
        return map(list, zip(*read_all))

#################

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import sys
sys.setrecursionlimit(10**9)
INF=10**18
MOD=10**9+7
def input(): return sys.stdin.readline().rstrip()

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:

# じょえチャンネルおもしろいよ～～～
# https://www.youtube.com/channel/UCRXsI3FL_kvaVL9zoolBfbQ

#a,b,c,d=map(int,input().split())
s=input()
if len(set(list(s)))==2:print("Yes")
else:print("No")

Submission status: Accepted

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

import sys
sys.setrecursionlimit(300000)

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

def solve(S: str):
    s = set(S)
    if len(s) > 1:
        ret = YES
    else:
        ret = NO
    print(ret)
    return

def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    S = next(tokens)  # type: str
    solve(S)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
S=input()
print("YNeos"[not(S[0]!=S[1] or S[1]!=S[2])::2])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import bisect
import cmath
import heapq
import itertools
import math
import operator
import os
import random
import re
import string
import sys
from collections import Counter, deque, defaultdict
from copy import deepcopy
from decimal import Decimal
from fractions import gcd
from functools import lru_cache, reduce
from operator import itemgetter, mul, add, xor

import numpy as np

if os.getenv("LOCAL"):
    sys.stdin = open("_in.txt", "r")

sys.setrecursionlimit(10 ** 9)
INF = float("inf")
IINF = 10 ** 18
MOD = 10 ** 9 + 7
# MOD = 998244353


S = sys.stdin.buffer.readline().decode().rstrip()
ok = len(Counter(list(S))) == 2
if ok:
    print('Yes')
else:
    print('No')

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
package main

import (
	"fmt"
)

func answer158A(s string) string {
	if s == "AAA" || s == "BBB" {
		return "No"
	} else {
		return "Yes"
	}
}

func main() {
	var s string
	fmt.Scan(&s)
	
	fmt.Println(answer158A(s))
}

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
S = input()
Q = int(input())

lS = ''
for _ in range(Q):
    query = input().split()
    if query[0] == '1':
        lS, S = S, lS
    else:
        if query[1] == '1':
            lS += query[2]
        else:
            S += query[2]

print(lS[::-1] + S)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
s = input()
q = int(input())
rev = 1
for i in range(q):
  t = input()
  
  if t == '1':
    rev *= -1
  else:
    x,y,sr = t.split()
    if rev == 1 and y == '2':
      s = s + sr
    else:
      s = sr + s

if rev == -1:
  s = s[::-1]
  
print(s)

Submission status: Runtime Error

Solution code:
x = [int(x) for x in input().split()]
A, B = x[0], x[1]
a = int(100 * A / 8)
b = 10 * B
if a == b:
    print(a)
elif a > b and int(a * 0.1) == B:
    print(a)
elif b > a and int(b * 0.08) == A:
    print(b)
else:
    print(-1)

Submission status: Runtime Error

Solution code:
S = str(input())
if S[1] + S[2] == 'A':
    print('Yes')
elif S[2] + S[3] == 'B':
    print('Yes')
else:
    print('No')

Submission status: Runtime Error

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: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
S = input()

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

Submission status: Runtime Error

Solution code:

a, b = map(int, input().split())
a1 = set([i for i in range(int(a/0.08),int((a+1)/0.08)+1)])
b1 = set([i for i in range(int(b/0.1), int((b+1)/0.1)+1)])
c = a1 & b1
if len(c) == 0:
  print(-1)
else:
  print(min(c))

Submission status: Runtime Error

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

def main():
    S = input().replace('\n', '')
    Q = int(input())

    for _ in range(Q):
        query = input().split()
        if len(query) == 1:
            S = S[::-1]
        else:
            T, F, C = query
            if int(F) == 1:
                S = C + S
            else:
                S = S + C
    print(S)


main()

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a = input()
b = 0
c = 0
i = 0
while i < a :
    if a[i] == "A" :
        b = b + 1
    if a[i] == "B" :
        c = c + 1
    i = i + 1
if (b > 0) and (c > 0) :
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
# import itertools
# import math
# import sys
# sys.setrecursionlimit(500*500)
# import numpy as np

# N = int(input())
S = input()
# n, *a = map(int, open(0))
# N, M = map(int, input().split())
# A = list(map(int, input().split()))
# B = list(map(int, input().split()))
# tree = [[] for _ in range(N + 1)]
# B_C = [list(map(int,input().split())) for _ in range(M)]
# S = input()

# B_C = sorted(B_C, reverse=True, key=lambda x:x[1])
# all_cases = list(itertools.permutations(P))
# a = list(itertools.combinations_with_replacement(range(1, M + 1), N))
# itertools.product((0,1), repeat=n)

# A = np.array(A)
# cum_A = np.cumsum(A)
# cum_A = np.insert(cum_A, 0, 0)

# def dfs(tree, s):
#     for l in tree[s]:
#         if depth[l[0]] == -1:
#             depth[l[0]] = depth[s] + l[1]
#             dfs(tree, l[0])
# dfs(tree, 1)

Q = int(input())
direction = 1
for i in range(Q):
    l = input().split()
    if l[0] == "1":
        direction *= -1
    else:
        if (l[1] == "1" and direction == 1) or (l[1] == "2" and direction == -1):
            S = l[2] + S
        else:
            S += l[2]

if direction == 1:
    print(S)
else:
    print(S[::-1])

Submission status: Runtime Error

Solution code:
import sys
a,b=map(int,input().split())
for i in range(2000):
    if i*8/100==a and i*10/100==b:
        print(i)
        exit()
print(-1)

Submission status: Runtime Error

Solution code:
a,b=map(int,input().split())
for i in range(2000):
    if i*8/100==a and i*10/100==b:
        print(i)
        exit()
print(-1)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
def resolve():
    N = int(input())
    import math
    print(math.ceil(N/2))

if '__main__' == __name__:
    resolve()

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n, a, b = [int(_) for _ in input().split()]
print((n // (a + b)) * a + min(n % (a + b), a))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a,b = map(int,input().split())
low = int(min(a//0.08,b//0.1))
high = int(max((a+1)//0.08,(b+1)//0.1))
for i in range(low,high+1):
    if int(i*0.08)==a and int(i*0.1)==b:
        print(i);  break
else:
    print(-1)

Submission status: Runtime Error

Solution code:
N, A, B = map(int, input().split())
M = N // (A + B)

if N > (A + B):
    print(A * M + N - M * (A + B))
else:
    print(min(N, A))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n,a,b = map(int,input().split())
div = n//(a+b)
mod = n%(a+b)
print(div*a+min(mod,a))

Submission status: Runtime Error

Solution code:
import math

i = [int(x) for x in input().split()]

ans = math.ceil((i[0]/ (i[2] + i[1])) ) * i[1]

print (ans)

Submission status: Runtime Error

Solution code:
s = list(input())

d = { x for x in s}

if len(d) == 1:
  print ("NO")
else :
  print ('YES')

Submission status: Runtime Error

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