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

Submission status: Accepted

Solution code:
s = set(input())
if len(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]):
    a = 0
else:
    a = 1

if a == 1:
    print('Yes')
else:
    print('No')

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

if 'A' not in S or 'B' not in S:
  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()
res = "Yes"

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

print(res)

Submission status: Accepted

Solution code:
s = input()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = list(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

s = input()

a_count = 0
b_count = 0

for i in s:
    if i == 'A':
        a_count+=1
    if i == 'B':
        b_count+=1

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

Submission status: Accepted

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from functools import reduce
from fractions import gcd
import math
import bisect
import itertools
import sys
from collections import defaultdict
sys.setrecursionlimit(10**7)
input = sys.stdin.readline
INF = float("inf")


def main():
    S = input()[:-1]
    
    if S in ["AAA", "BBB"]:
        print("No")
    else:
        print("Yes")


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = input()
a=n[0]
b=n[1]
c=n[2]
A = 0
B = 0
if a=='A':
	A =+ 1
else:
	A = A 
if b=='A':
	A =+ 1
else:
	A = A 	
if c=='A':
	A =+ 1
else:
	A = A 

if a=='B':
	B =+ 1
else:
	B = B 
if b=='B':
	B =+ 1
else:
	B = B 
if c=='B':
	B =+1
else:
	B = B 

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

Submission status: Accepted

Solution code:
S = input()

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

Submission status: Accepted

Solution code:
from sys import stdin, setrecursionlimit


def main():
    input = stdin.buffer.readline
    s = list(input()[:-1])
    print('No') if len(set(s)) == 1 else print('Yes')


if __name__ == "__main__":
    setrecursionlimit(10000)
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input();

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

Submission status: Accepted

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

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

resolve()

Submission status: Accepted

Solution code:
# ABC158A

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

Submission status: Accepted

Solution code:
input_line = input()
if ("A" not in input_line) or ("B" not in input_line): 
    print("No")
else:
    print("Yes")

Submission status: Accepted

Solution code:
s = input()

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

Submission status: Accepted

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

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=set(s)
if len(a)==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()
a = s.count('A')
b = s.count('B')

if(a==3):
    print('No')
elif(b==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(s=="AAA" or s=="BBB"):
  	print("No")
else:
  	print("Yes")

Submission status: Accepted

Solution code:
S = input()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = list(input())
ans = 0

for i in range(0,2):
    if(S[i] != S[i+1]):
        ans = 1
        break
    else :
        ans = 0

if(ans == 1):
    print('Yes')
elif(ans == 0):
    print('No')

Submission status: Accepted

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

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


def is_multi_line(S: str):
    if len(set(S)) != 1:
        return True
    else:
        return False


def main():
    S = input()  # type: str
    print(YES if is_multi_line(S) else NO)


if __name__ == '__main__':
    main()

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

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

Submission status: Accepted

Solution code:
import itertools
import math
import fractions
import functools
s = input()
if s == "AAA" or s=="BBB":
    print("No")
else:print("Yes")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=input()
if n=="AAA" or n=="BBB":
    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:
def main():
    s = input()
    cond = not (s[0] == s[1] == s[2])
    print('Yes' if cond else 'No')


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

S = list(input())

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

Submission status: Accepted

Solution code:
s = input()
if not s[0]==s[1]==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:
from collections import Counter,defaultdict,deque
from heapq import heappop,heappush,heapify
from bisect import bisect_left,bisect_right 
import sys,math,itertools,fractions,pprint
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()
print('No' if s.count('A') == 3 or s.count('B') == 3 else 'Yes')

Submission status: Accepted

Solution code:
import sys, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from heapq import heapify, heappop, heappush
 
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def S_MAP(): return map(str, input().split())
def LIST(): return list(map(int, input().split()))
def S_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:
import itertools
import math
import string
import collections
from collections import Counter
from collections import deque
from operator import itemgetter
import sys
sys.setrecursionlimit(2*10**5)
INF = 2**60


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


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


def has_duplicates2(seq):
    seen = []
    for item in seq:
        if not(item in seen):
            seen.append(item)
    return len(seq) != len(seen)


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


# coordinates
dx = [-1, -1, -1, 0, 0, 1, 1, 1]
dy = [-1, 0, 1, -1, 1, -1, 0, 1]
s = input()
if s == 'BBB' or s == 'AAA':
    print('No')
    exit()
print('Yes')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**7)
from collections import Counter, deque
from collections import defaultdict
from itertools import combinations, permutations, accumulate, groupby, product
from bisect import bisect_left,bisect_right
from heapq import heapify, heappop, heappush
from math import floor, ceil
from operator import itemgetter
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def LI2(): return [int(input()) for i in range(n)]
def MXI(): return [[LI()]for i in range(n)]
def printns(x): print('\n'.join(x))
def printni(x): print('\n'.join(list(map(str,x))))
inf = 10**17
mod = 10**9 + 7
#s=input().rstrip()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin
def main():
    #入力
    readline=stdin.readline
    S=readline().strip()
    if S=="AAA" or S=="BBB":
        print("No")
    else:
        print("Yes")
if __name__=="__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

  return

if __name__ == "__main__":
  resolve()

Submission status: Accepted

Solution code:
import sys, math, itertools, collections, bisect
input = lambda: sys.stdin.buffer.readline().rstrip().decode('utf-8')
inf = float('inf') ;mod = 10**9+7
mans = inf ;ans = 0 ;count = 0 ;pro = 1

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

Submission status: Accepted

Solution code:
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

s = readline().rstrip().decode()
print('Yes' if 'A' in s and 'B' in s else 'No')

Submission status: Accepted

Solution code:
import sys

sys.setrecursionlimit(10 ** 7)
f_inf = float('inf')
mod = 10 ** 9 + 7


def resolve():
    s = list(input())
    if len(set(s)) != 1:
        print("Yes")
    else:
        print("No")


if __name__ == '__main__':
    resolve()

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
S = set(list(input())[: -1])
if len(S) > 1: print("Yes")
else: print("No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

class abc_158:
    
    def __init__(self):
        pass
    
    def A(self):
        S=input()
        if "BA" in S or "AB" in S:print("Yes")
        else:print("No")
    
    def B(self):
        NAB=list(map(int,input().split()))
        tail = NAB[0]%(NAB[1]+NAB[2]) if NAB[0]%(NAB[1]+NAB[2])<NAB[1] else NAB[1]
        ans=((NAB[0]/(NAB[1]+NAB[2]))*NAB[1])+tail
        print(int(ans))
            
    def C(self):
        AB=list(map(int,input().split()))
        ans=-1
        
        #A<B<100
        for i in range(1,101):
            if AB[0]==int(i*0.08) and AB[1]==int(i*0.1):
                ans=i
                break
            else:continue
        print(ans)
            
    def D(self):
        pass
        
    def E(self):
        pass
    
    def F(self):
        pass
    
    
if __name__=='__main__':
    obj=abc_158()
    obj.A()

Submission status: Accepted

Solution code:
S=input()

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

Submission status: Accepted

Solution code:
s = input()
m = s[0]
for i in range(2):
    if m !=  s[1+i]:
        print('Yes')
        break
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin
S = stdin.readline().rstrip()
print('No' if S == 'AAA' or S == 'BBB' else 'Yes')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()

if len(set(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:
s=input()
print('No' if s=='AAA' or s=='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 = input()
if 'A' not in S:
  print('No')
elif 'B' not in S:
  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()
ln = len(s)

for i in range(0, ln-1):
    if s[i] != s[i+1]:
        print('Yes')
        exit()
print('No')

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

    if S.count(S[0]) == 3:
        print('No')
    else:
        print('Yes')


if __name__ == '__main__':

    ABC_158_A()

Submission status: Accepted

Solution code:
S=input()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

s = input()

for i in range(len(s)-1):
    if s[i] != s[i+1]:
        print("Yes")
        sys.exit()
    
print("No")

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
s = input()
print(["No", "Yes"][0 < s.count("A") < 3])

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('B') == 3 or S.count('A') == 3:
    print('No')
else:
    print('Yes')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s=input()

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

Submission status: Accepted

Solution code:
s = input()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8
import sys

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

S = sr()
bl = len(set(S)) != 1
print('Yes' if bl else 'No')

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

from fractions import gcd
from collections import Counter, deque, defaultdict
from heapq import heappush, heappop, heappushpop, heapify, heapreplace, merge
from bisect import bisect_left, bisect_right, bisect, insort_left, insort_right, insort
from itertools import accumulate, product, permutations, combinations, combinations_with_replacement

S = input()

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

Submission status: Accepted

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

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

s = LS()
if 'A' in s:
    if 'B' in s:
        print('Yes')
        exit()
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()
if s == 'AAA' or s == '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:
s=input()
print('Yes' if len(set(s))==2 else 'No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
val = input()

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

Submission status: Accepted

Solution code:
s = input()

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

Submission status: Accepted

Solution code:
S = input()

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Thu May  7 00:55:20 2020

@author: shinba
"""

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] or s[1]!=s[2] and s[0]!=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:
# -*- coding: utf-8 -*-
S = input()
a = "AAA"
b = "BBB"
if S == a:
    print("No")
elif S == b:
    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 S[0]==S[1]==S[2]:
    print("No")
else:
    print("Yes")

Submission status: Accepted

Solution code:

S = input()

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

Submission status: Accepted

Solution code:
# A - Station and Bus

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())
a, b = 0, 0
a = s.count('A')
b = s.count('B')

if a > 0 and b > 0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def resolve():
    S = list(input())

    if 'A' in S and 'B' in S:
        print('Yes')
        return

    print('No')


resolve()

Submission status: Accepted

Solution code:
s=input()

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

Submission status: Accepted

Solution code:
lst=list(str(input()))
a=set()
for i in range(3):
  a.add(lst[i])
if len(a)==2:
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
s = input()
if len(set(s)) > 1:
    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 == 'BBB' or s == 'AAA') else 'Yes')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10 ** 6)
# input = sys.stdin.readline    ####
int1 = lambda x: int(x) - 1
def II(): return int(input())

def MI(): return map(int, input().split())
def MI1(): return map(int1, input().split())

def LI(): return list(map(int, input().split()))
def LI1(): return list(map(int1, input().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]

INF = float('inf')

def solve():
    S = list(input())

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


if __name__ == '__main__':
    solve()

Submission status: Accepted

Solution code:
S = [c for c in input()]
print("Yes" if len(set(S))==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:
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop
from itertools import permutations, accumulate
from math import sqrt, ceil, floor, factorial
from bisect import bisect_left, bisect_right
from copy import deepcopy
from operator import itemgetter
from fractions import gcd
import sys
def I(): return int(input())  # '123' -> 123
def Is(): return map(int, input().split())  # '123 456' -> 123, 456
def LI(): return list(map(int, input().split()))  # '123 456' -> [123, 456]
def TI(): return tuple(map(int, input().split()))  # '123 456' -> (123, 456)
def IR(n): return [I() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def TIR(n): return [TI() for _ in range(n)]
def S(): return input()
def Ss(): return input().split()  # 'aa bb' -> 'aa','bb' or ['aa','bb']
def LS(): return list(input())  # 'abc123' -> ['a','b','c','1','2','3']
def SR(n): return [S() for _ in range(n)]
def SsR(n): return [Ss() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
sys.setrecursionlimit(1000000)
MOD = 1000000007
INF = float('inf')

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

Submission status: Accepted

Solution code:
S = input()

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

Submission status: Accepted

Solution code:
S = input()
a = S.count("A")
b = S.count("B")

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

Submission status: Accepted

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

Submission status: Accepted

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


if __name__ == '__main__':
    main()

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

if len(set(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().strip()

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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


main()