peterverebics/CodeNet_Python_118 huggingface dataset:
test_input = str(input())
if test_input.count("A") == 3 or test_input.count("B") == 3:
    print ("FALSE")
else:
    print("TRUE")
if __name__ == '__main__':
    s = input()
    print("no" if s == "AAA" or s == "BBB" else "yes")
S = input()

if S.count('A') or S.count('B') == 3:
    print('No')
else:
    print('Yes')
# 1
s = input()
if (s[:2] == "AA" or s[:2] == "BB" or s[-2:] == "AA" or s[-2:] == "BB"):
    print("No")
else:
    print("Yes")
S = input()
list(S)
if S in "A":
  if S in "B":
    print("Yes")
  
  else:
    print("No")

else:
  print("No")
S = [input()]

for i in range(len(S)-1):
    if s[i] != s[i+1]:
        print("Yes")
    else:
        print("No")
string = str(input())
if ( (string[0]=='A' or string[1]=='A' and string[2]=='A') and (string[0]=='B' or string[1]=='B' and string[2]=='B')):
	print('Yes')
else:
	print('No')
c = sorted(list(input().split()))
 
if c[0]=='A' and c[2]=='B':
  print('Yes')
else:
  print('No')
Flag =  0 
S = input()
SA = [str(c) for c in S]
A = list(['A','A','A'])
B = list(['B','B','B'])
print(SA)
if(set(S) == set(A) and set(S) ==set(B)):
    print("No")
else:
    print("Yes")
S=input()
if S=='AAA'or'BBB':
  print('No')
else:
  print('Yes')
S = input()
print("Yes" if S == "AAA" or S == "BBB" else "No")
S = input()
if S == 'AAA' or 'BBB':
    print('No')
else:
    print('Yes')
s = input()
if s == 'AAA' and 'BBB':
  print('No')
else:
  print('Yes')
S = input()
if S[0] == 'A' and S[1] == 'A' and S[2] == 'A':
    print('NO')
elif S[0] == 'B' and S[1] == 'B' and S[2] == 'B':
    print('NO')
else:
    print('YES')
from sys import stdin
#T = int(stdin.readline())
S = stdin.readline().strip()
print(S)
if S == "AAA" or S == "BBB":
    print('No')
else:
    print('Yes')
S = input()
if S[0]==S[1]==S[2]:
    print('Yes')
else:
    print('No')
from sys import stdin


def get_result(data):
    S = data[0]
    return 'Yes' if S != 'AAA' and S != 'BBB' else 'No'


if __name__ == '__main__':
    data = list(map(str, stdin.readline().split(' ')))
    result = get_result(data)
    print(result)
s = input()
if s == "AAA":
    yn = "Yes"
elif s == "BBB":
    yn = "Yes"
else:
    yn = "No"
print(yn)
s=input()
if s=="AAA" or "BBB":
  print("No")
else:
  print("Yes")
import random
import numpy as np

S =list =["A","B"]
x = np.random.choice(S)
y = np.random.choice(S)
z = np.random.choice(S)
#print(x,y,z)
if x == y == z:
    print("No")
else:
    print("Yes")
if __name__== '__main__':
  s = input('>>')
  if s[0] == 'A' and s[1] == 'A' and s[2] == 'A':
        	print('Yes')
  elif s[0] == 'B' and s[1] == 'B' and s[2] == 'B':
      		print('Yes')
  else:
        	print('No')
s = input()
if s is 'AAA' or s is 'BBB':
  print('No')
else:
  print('Yes')
x = input()

if x[0]==x[1]==x[2]:
  print("Yes")
else:
  print("No")
s = input()
a = int(s.count("A"))
b = int(s.count("B"))

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

else:
    print("Yes")
S=input("   ")
if S==("AAA"):
     print("NO")
else:
   print("Yes")
S=input()
s=set(S)
if len(s)==3:
  print("Yes")
else:
  print("No")
s=input()
if len(s)==3 or len(s)==0:
  print("No")
else:
  print("Yes")
s=input()
print("Yes" if s[0]==s[1]==s[2] else "No")
S = input()

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

if s[0]==s[1] and s[1]==s[2]:
  print('Yes')
else:
  print('No')
import sys
a = sys.argv
if a == "aaa" and a == "bbb":
    print("No")
else:
    print("Yes")
S = input("S?")
if S[0] == S[1] and S[0] == S[2]:
    print("No")
else:
    print("Yes")
text = input()
if text == "AAA" or text == "BBB":
    print("NO")
else:
    print("YES")
S = input()
if S[0] != S[1] and S[0] != S[2]:
    print("Yes")
elif S[0] != S[1] and S[1] != S[2]:
    print("Yes")
else:
    print("No")
S = input()

if 'A' and 'B' in S:
    print('Yes')
else:
    print('No')
value = input()
if value == "AAA" or "BBB" or "ABA" or "BAB":
  print("No")
else:
  print("Yes")
S = input()
 
if S == 'AAA' or 'BBB':
    print('No')
if S == 'AAB' or 'ABA' or 'ABB' or 'BAA' or 'BBA' or 'BAB':
    print('Yes')
s=input()
if s=="AAA" or s=="BBB":
  print("NO")
else:
  print("YES")
s = input()
a = s.count("A")
b = s.count("B")

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

else:
    print("Yes")
s=str(input())
if s=='AAA' or 'BBB':
  print('No')
else:
  print('Yes')
if len(set(input()))==1:
  print('Yes')
else:
  print('No')
stations = str(input())
bus = False
for i in range(0, len(stations)-2):
    if(stations[i] != stations[i+1]):
        bus = True

if(bus):
    print('Yes')
else:
    print('No')
a=input()
print('Yes' if a=='AAA' or a=='BBB' else 'No')
X = input()
Y = X.count("A")
Z = X.count("B")
if (Y == 3 or Z ==3):
  print("Yes")
else:
  print("No")
s = input()
if s == 'AAA' or 'BBB':
  print('Yes')
else:
  print('No')
user = str(input().upper())
for i in user:
    if user.count(i) == 2:
        print("Yes")
def check_service(service):
    no_service = ['AAA', 'BBB']
    if service in no_service:
        print("No")
    print("Yes")
s= input()
if "AB" in s or "BA" in s:
  print("YES")
else:
  print("NO")
import sys
input = sys.stdin.readline
s=input().rstrip()
if len(set(s))>1:
    print('YES')
else:
    print('NO')
S = input()
if set(S) == 2:
    print("Yes")
else:
    print("No")
L=list(input())
print("No" if L.count("A")==0 else "Yes")
S = list(input())
if set(S) == 2:
    print("Yes")
else:
    print("No")
S = input()

S = 'BAB'

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

judgment1 = 'A' in temp
judgment2 = 'B' in temp

if judgment1 == True:
    if judgment2 == True:
        print("Yes")
else:
    print('No')
a = str(input())
if a == "AAA"or"BBB":
  print("No")
else:
  print("Yes")
s = input()
if s == "AAA" or s == "BBB":
    print("Yes")
else:
    print("No")
s = input()
if s[0] == s[2] and s[0] != s[1] and s[1] != s[2]:
    print('Yes')
else:
    print('No')
import sys
read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines

def main():
    s = readline().strip()

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



if __name__ == "__main__":
    main()
a,b,c=input()
if a==b and b==c:
  print("YES")
else:
  print("NO")
s = input()
s = set(list(s))
if len(s) == 1:
    print('Yes')
else:
    print('No')
S=input()
if S[0:1]==S[1:2]==S[2:3]:
  print('Yes')
else:
  print('No')
x = list(input())

if x[0] == x[1] and x[1]==x[2]:
  print("Yes")
else:
  print("No")
s = input()
if s == "AAA" or "BBB":
    print("No")
else:
    print("Yes")
s = input()

if s == 'AAA' or 'BBB':
    print('No')
else:
    print('Yes')
S = str(input())
if S[0]==S[1] and S[1]==S[2]:
  print('Yes')
else:
  print('No')
s = list(input())
if s[0] == s[2]:
    print('Yes')
else:
    print('No')
def solve(s):
    if s == 'AAA' or s == 'BBB':
        print("No")
    else:
        return("Yes")

s = raw_input()
solve(s)
s = input()
res = "Yes" if len(set(s)) < 3 else 'No'
print(res)
a,b,c=input()
if a==b and b==c:
  print("NO")
else:
  print("YES")
s = list(input())
if "A" in s and not("B" in s):
  print("No")
elif "B" in s and not("A" in s):
  print("NO")
else:
  print("Yes")
A=list(input())
A.sort()#sortメソッドは破壊的
print("Yes" if A[1]!=A[2] else "No")
S = input()
if S == 'AAA' or S == 'BBB':
    print('NO')
else:
    print('Yes')
# To add a new cell, type '# %%'
# To add a new markdown cell, type '# %% [markdown]'
lst = input().split()
# %%
one = lst[0][0]
two = lst[0][1]
three = lst[0][2]


# %%
one_two = one == two
two_three = two == three
three_one = three == one




# %%
if any([one_two, two_three, three_one]):
    print('Yes')
else:
    print('No')


# %%
if len(set(input())) >= 2:
	print('yes')
else:
	print('No')
s = input()
if s == 'AAA' or 'BBB':
    print('No')
else:
    print('Yes')
abc=str(input())
a=abc[0]
b=abc[1]
c=abc[2]



if a == b and b==c and c==a:
    print("Yes")
else:
    print("No")
S = input()
if S[0] == S[1] and S[1]== S[2]:
    print("no")
else:
    print("yes")
s = input()
if s == "AAA" or "BBB" :
    print("No")
else:
    print("Yes")
list = str(input())

if list is "AAA" or list is "BBB" :
    print("No")
else : 
    print("Yes")
a = input()

if a == 'AAA' or 'BBB':
    print('No')
else:
    print('Yes')
s = input()
print('Yes' if s == 'AAA' or s== 'BBB' else 'No')
s=input()
if s.count("A")!=s.count("B"): print("Yes")
else: print("No")
if input() == ("AAA" or "BBB"):
    print("No")
else:
    print("Yes")
s = str(input())
if s is "AAA" or s is "BBB":
  print("No")
else:
  print("Yes")
s = input()

if (s[0] == s[2]) and (s[0] != s[1]):
    print('Yes')
elif (s[1] == s[2]) and (s[0] != s[2]):
    print('Yes')
else:
    print('No')
S=input()
a=S[0]
flag=0
for i in range(3):
  if (a!=S[i]):
    fgag=1
if (flag==0):
  print('No')
else:
  print('Yes')
S = input()

if S == "AAA" or "BBB":
    print("No")
else:
    print("Yes")
s = list(input())
s.sort()
print(s)
if s[0] == s[2]:
    print('No')
else:
    print('Yes')
S=input('S')
if S[0]==S[1] and S[1]==S[2]:
    print('No')
else:
    print('Yes')
Si = input()

if "AB" in Si or "BA" in Si:
  print("yes")
else:
  print("no")
S=input()

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

if s[0] == s[1] == s[2]:
    print('Yes')
else:
    print('No')
str = input()
a = str[0]
b = str[1]
c = str[2]

if a == b ==c:
  print('NO')
elif a != b or a != c or b != c:
  print('YES')
s=input()
if s=="AAA" or "BBB":print("No")
else:print("Yes")
s=input()
if (s=="AAA" or s=="BBB"):
   print("Yes")
else:
   print("No")
import sys
str=input()
if str == "AAA" or str == "BBB":
    print ("NO")
else:
    print ("YES")
s = input()
if "A" and "B" in s:
  print("Yes")
else:
  print("No")
s=str(input())
s=list(set(s))
if len(s)!=3:
  print("Yes")
else:
  print("No")
s = input()
if 'A' in s and 'B' in s:
    print('YES')
else:
    print('NO')
S = input()
print('No' if S == 'AAA' or 'BBB' else 'Yes')
s=input()
s=list(s)
print(s)
if "A" not in s or "B" not in s:
  print("No")
else:
  print("Yes")
s=input()

if(s[0]==s[1] and s[1]==s[2]):
	print("Yes")
else:
	print("No")
stations = input()
s = stations.split()

if len(s) != 3:
    pass
elif (s[0] == s[1] == s[2]):
    print('No')
elif (s[0] != s[1] != s[2]):
    print('No')
else:
    print('Yes')
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 9)
MOD = 10 ** 9 + 7

S = list(input())

if len(S) == len(set(S)):
    print ('No')
else:
    print ('Yes')
import sys
input=sys.stdin.readline
s=input().rstrip()
if s=='AAA' or 'BBB':
    print('No')
else:
    print('Yes')
S = input()
a = S[0]
b = S[1]
c = S[2]

if a == 'A' or b == 'A' or c == 'A':
    print('Yes')
else:
    print('No')
s = input()

if s == "ABA":
    print("Yes")
else:
    print("No")
h1=input()

if h1 == 'AAA' and h1 == 'BBB':
  print ('no')
else :
   print ('yes')
import sys

s = str(input("S = "))

len(s)==3

if (('A') not in s) and (('B') not in s):
   sys.exit()

elif (s == ("AAA")) or (s ==("BBB")):
   print ("No")

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

if S == ("AAA" or "BBB"):
    print("No")
else:
    print("Yes")
S = input()
if S[0] ==  S[1] ==  S[2]:
  print('Yes')
else:
  print('No')
s = input()
s = set(s)
if len(s) == 1:
    print('Yes')
else:
    print('No')
s=input()
if s =='AAA' or s=='BBB':
    print('no')
else:
    print('Yes')
S = input()
if len(S) == 1:
    print("No")
else:
    print("Yes")
s=input()
if s=="aaa" or s=="bbb":
  print("No")
else:
  print("Yes")
a = input().count('A')
if a != 0 or a != 3:
    print('Yes')
list = str(input())

if list is not "AAA" and list is not "BBB" :
    print("No")
else : 
    print("Yes")
s = input()
if 'A' in s and 'B' in s:
  print("YES")
else:
  print("NO")
a=input()
if a.count("A")>=1 & a.count("B")>=1:
  print("Yes")
else:
  print("No")
S =list(input())
if S[0]!=S[1]:
    print("Yes")
elif S[0]==S[1] and S[1]==S[2]:
    print("No")
S = input()

cnt = 0

for c in S:
    if c == "A":
        cnt += 1

if c == 0 or c == 3:
    print("No")
else:
    print("Yes")
s = input()
if len(set(s)) == 1:
    print(False)
else:
    print(True)
s = input()
if s == 'AAA' or 'BBB':
  print('No')
else:
  print('Yes')
print("YES" if input() in "A" and input() in "B" else "NO")
S=input().split()

if S.count('A') == 3 or S.count('B') == 3:
    print('No')
else:
    print('Yes')
S = input()
if S == "AAA" or "BBB":
    print("No")
else:
    print("Yes")
station = list(input())
message = ""

print(station)
for i in range(0, len(station)-1):
    if (station[i] != station[i + 1]):
        message = 'Yes'
        break
    else:
        message = 'No'


print(message)
states = input()

if states.find('A') < 0 or states.find('B') < 0:
    print('Yes')
else:
    print('No')
s = input()
if s[0] == s[1] == s[2]:
  print("Yes")
else:
  print("No")
S = str(input())
if S == 'AAA' or 'BBB':
    print('No')
else:
    print('Yes')
S = input()
if S == "AAA" or "BBB":
  ANS = "No"
else:
  ANS = "Yes"
  
print(ANS)
s = input()
 
print('YES' if len(set(s)) == 2 else 'NO')
m=input()
m2=[m[:1],m[1:2],m[2:]]

if ['A','B']in m2:
  print('Yes')
  
else:
  print('No')
s = input()
if len(sorted(s)) == 1:
  print("No")
else:
  print("Yes")
s = set(input())
if(len(s) == 2):
    print('Yes')
else:
    print('NO')
s=input()
if s == 'AAA' or 'BBB':
  print('No')
else:
  print('Yes')
s = input()
if s == "AAA" or "BBB":
  print("No")
else:
  print("Yes")
s = input()

ans='No'
if s=='AAA': ans='Yes'
if s=='BBB': ans='Yes'

print(ans)
S = input()
if S[0]!=S[1] and S[0]==S[2]:
  print("Yes")
else:
  print("No")
S=input()
if S[0]==S[1] and S[1]==S[2]:
    print("no")
else:
    print("yes")
s=input()
print("Yes" if len(set(s))==1 else "No")
a = input()
print('Yes' if 'A' in a else 'No')
i = input()
if i=='AAA' or i=='BBB':
  print('no')
else:
  print('yes')
s = input()
if s == "AAA" or "BBB":
	print("No")
else:
	print("Yes")
S=str(input())
if S!='AAA' or S!='BBB':
  print('Yes')
else:
  print('No')
s = input()
if len(set(s)) == 0:
    print('No')
else:
    print('Yes')
s = input()
if 'A' in s and 'B' in s:
    print("YES")
else:
    print("NO")
S=input()
if(S in ("A" or "B")):
  print("Yes")
else:
  print("No")
s = input()
f = False
for i in range(0,2):
  if s[i] != s[i+1]:
    f = True
    break
    
if f:
  print('YES')
else:
  print('NO')
n=input()
if 'A' in n and 'B' in n:
  print("YES")
else: 
  print("NO")
S=input()
if(("AB"or"BA")in S):
  print("Yes")
else:
  print("No")
s = input()

if s == 'AAB' or s == "ABA" or s == 'ABB' or s == 'BAA' or s =="BAB" or s=="BBA":
    print("YES")
else:
    print('NO')
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop

def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
MOD = 10 ** 9 + 7

S = input()

print("Yes" if len(set(S))==1 else "No")
S=input()
l = ['AAA','BBB']

if S in l:
    print('No')
if S not in l:
    print('No')
S = input()
if S[0] == S[1] and S[1] == S[2]:
  print("Yes")
else:
  print("No")
A = str(input())

if A=="AAA":
  print("NO")
  
if A=="BBB":
  print("NO")


if A =="AAB"or"ABA"or"BAA"or"BBA"or"BAB":
  print("YES")
S = input()
if S[0]==S[1] or S[1]==S[2] or S[2]==S[0]:
  print("Yes")
else:
  print("No")
import random
import numpy as np
A = 1
B = 2
S =[A,B]
x = np.random.choice(S)
y = np.random.choice(S)
z = np.random.choice(S)
if x == y == z:
    print("No")
else:
    print("Yes")
list = ["AAA","AAB","ABB","BBB","BBA","BAA","ABA","BAB"]
S = input()
if S not in list:
    print("3文字かつAもしくはBのみで構成する入力を与えてください")
    S = input()
elif S[0] == S[1] == S[2]:
    print("Yes")
else:
    print("No")
i = input()
if i == ('AAA' or 'BBB'):
  print('Yes')
else:
  print('No')
i=input();'YNeos'[i=='AAA' or i=='BBB'::2]
S = input()
if S.count('A') == 3 or S.count('B') == 3:
    print("NO")
else:
    print("YES")
Flag =  0 
S = input()
SA = [str(c) for c in S]
A = list(['A','A','A'])
B = list(['B','B','B'])
print(SA)
if(set(SA) == set(A) or set(SA) ==set(B)):
    print("No")
else:
    print("Yes")
S =list(input())
if S[0]!=S[1]:
    print("Yes")
if S[0]==S[1] and S[1]==S[2]:
    print("No")
temp = input()

judgment1 = 'A' in temp
judgment2 = 'B' in temp

if judgment1 == True:
    if judgment2 == True:
        print("Yes")
else:
    print('No')
import sys
input = sys.stdin.readline
S = input()
if S == "AAA" or S == "BBB" :
    print("No")
else :
    print("Yes")
S = list(input())
print(S)
if S[0] == S[2] and S[1] == S[2]:
    print('NO')
else:
    print('YES')
s=input()
if s in "AB" or "BA":
  print("Yes")
else:
  print("No")
S=str(input())
if S.count('A')>0 or S.count('B')>0:
    print('Yse')
else:
  print('No')
print('No' if input()=='AAA' or 'BBB' else 'Yes')
S = input()
if len(S) == 3:
    if S == str("AAA") and str("BBB"):
        print("No")
    else:
        print("Yes")
s = input().rstrip()

if len(set(s)) == 1:
    print("Yes")
else:
    print("No")
S=list(input())
if S[0]==S[2] and S[0]!=S[1]:
  print("Yes")
else:
  print("No")
s = str(input())

if s in "A":
    if s in "B":
        print("Yes")
    else:
        print("No")
else:
    print("No")
S=input()
if S[0]==S[1]:
    print('Yes')
elif S[1]==S[2]:
    print('Yes')
elif S[0]==S[2]:
    print('Yes')
else:
    print('No')
string = input()
if string == "AAA" or string == "BBB":
    print("NO")
else:
    print("YES")
str1 = str(input())
if str1 == 'AAA' or str1 == 'BBB':
	print('Yes')
else:
	print('No')
s = input()
if s.find('A') > 0 and s.find('B') > 0:
  print("Yes")
else:
  print("No")
s =input()

for i in range(len(s)):
    if s[i] in s:
        print('Yes')
        break
    else: 
        print('No')
s=set(input().split())
if len(s)==2:print('Yes')
else:print('No')
S=input()
station=set(S)
if len(station)>1:
    print('No')
else:
    print('Yes')
S=input()
if S[0] in S[1] in S[2]:
  print('Yes')
else:
  print('No')
s=input()
a=0
b=0
for i in s:
    if(s=="A"):a+=1
    else:b+=1
if(a*b==0):print("Yes")
else:print("No")
x = len(set([x for x in input().split()]))
if (x>1):
      print('Yes')
else:
      print('No')
from sys import stdin
#T = int(stdin.readline())
S = stdin.readline().strip()
print(S)
if S == "AAA" or S == "BBB":
    print("No")
else:
    print("Yes")
S = input()

if S in ("AAA", "BBB"):
    print("Yes")
else:
    print("No")
# -*- coding: utf-8 -*-
st = str(input())
while(True):
  if(st == "AAA"):
    print("Yes")
    break
  elif(st == "BBB"):
    print("Yes")
    break
  else:
    print("No")
    break
tmp = ""

for s in list(input()):
    if tmp == "":
        tmp = s
        continue
    if tmp != s:
        print("YES")
        exit()

print("NO")
# -*- coding: utf-8 -*-
S = input()
a = "AAA"
b = "BBB"
if S == a:
    print("NO")
elif S == b:
    print("NO")
else:
    print("YES")
N = input()
if N in 'A' and N in 'B':
  print('Yes')
else:
  print('No')
S = input()

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

if "A" and "B" in S:
    print("Yes")
else:
    print("No")
# ABC158
# A Station and Bus
import re
s = input()
x = s[0]
m = re.match(x+x+x,s)
if m:
    print("Yes")
    exit()
print("No")
S = input() 

if S.replace("A" ,"") == "" or S.replace("B", "") == "":
    print("No")
else:
    print("YES")
str  = input()
a = False
b = False
for ch in str:
    if ch == 'A':
        a = True
    else:
        b = True
if a and b:
    print("YES")
else:
    print("NO")
a,b,c = input()

if a == b == c:
    print("Yes")
else:
    print("No")
S = input()

print("Yes" if S.count("A")==2 and S.count("B")==2 else "No")
def A():
    S = input()
    s = "Yes"
    if S=="AAA" or S=="BBB":
        s = "No"
    return s


if __name__ == '__main__':
    A()
s = input()
if s[0]==s[1] and s[1]==s[2] and s[0]==s[2]:
    print("NO")
else:
    print('Yes')
s = input()

if(s=="BBB" or s=="ABB" or s=="BAB" or s=="BBA"):
    print("No")
else:
    print("Yes")
list = list(input())

if list[0] != list[1] and list[1] != list[2]:
    print('YES')
elif list[0] != list[2] and list[1] != list[2]:
    print('YES')
else :
    print("NO")
moji = str(input())
print(("No","yes")[("B" in moji) and ("A" in moji)])
S=input()
for a in S:
  if a=='AAA':
    print('No')
  elif a=='BBB':
    print('No')
  else:
    print('Yes')
S=input()
if S=="AAA"or"BBB":
    print("No")
else:
    print("Yes")
s = input()
if s.count(s[0]) == 3:
  print("Yes")
else:
  print("No")
s=input()
if s[0]==s[1]==s[2]:
    print("Yes")
else:
    print("No")
s=len(set(input().split()))
print("YNeos"[s == 2::2])
S=set(input())
n=len(S)
print("Yes" if n==1 else "No")
if input() == "AAA" or "BBB":
  print("No")
else:
  print("yes")
s = input()
if s == 'B'*len(s) or s == 'A'*len(s):
  print("NO")
else:
  print("YES")
s=input()
if s=="AAA"or s=="AAB"or s=="ABA"or s=="BAA"or s=="BBA"or s=="BAB"or s=="ABB":
    print("Yes")
else:
    print("No")
S = input()

if S == 'AAA' or 'BBB':
    print('NO')
else:
    print('Yes')
s = input()
x = s.count('A') ; y = s.count('B')
if (x == 1 and y == 2) or (x == 2 and y == 1):
    print("YES")
else:
    print('NO')
stdin = input()
if len(set(stdin)) == 1:
  print("No")
else:
  print("yes")
a = input()
if a == 'AAA' or 'BBB':
  print('Yes')
else:
  print('No')
s=input()
if s =="AAA" or "BBB":
    print("No")
else:
    print("Yes")
if len(set(input())) == 2:
	print('yes')
else:
	print('No')
s=input()
l=[]
for i in range(len(s)):
	l.append(s[i])
s_l=set(l)
print('YES' if len(s_l)==2 else 'NO')
#!/usr/bin/env python3
# -*- coding: utf-8 -*-


def main():
    S = input()
    print('Yes'if 1 < S.count('A') < 3else 'No')


if __name__ == "__main__":
    main()
S = input()
ans ='No'
if 'A' in S:
  if 'B' in S:
    S= 'Yes'
print(S)
s=input()

if s.count("A")==3 or s.count("B")==3:
	print("Yes")
    
else:
	print("No")
s = input()
fg = 0
for i in range(2):
    if s[i] != s[i+1]:
        fg = 1
if fg == 1:
    print("YES")
else:
    print("No")
a = input()
if a == 'AAA' or a == 'BBB':
  print('Yes')
else:
  print('No')
s = input()
if s[0] == s[1] and s[1] == s[2]:
  print("NO")
else:
  print("YES")
s = input()
q = 0
for i in range(2):
  if q != 0:
    print('Yes')
    exit()
  if s[2] != s[i]:
    q += 1
    
print('No')
s = input()
if s == "AAA" or "bbb" :
    print("No")
else:
    print("Yes")
#!/usr/bin/env python3
# -*- coding: utf-8 -*-


def main():
    s = input().split()
    if s == "aaa" or s == "bbb":
        print("Yes")
    else:
        print("No")


if __name__ == '__main__':
    main()
def judge(S):
    S=input()
    if (S[0]==S[1] and S[0]==S[2]):
        print('No')
    else:
        print('Yes')
s=list(input())
if s=="AAA" or "BBB":
  print("No")
else:
  print("Yes")
import sys
Flag =  0 
S = input()
SA = [str(c) for c in S]
A = list(['AAA'])
B = list(['BBB'])
print(SA)
if(set(S) == set(A) or set(S) ==set(B)):
    print("No")
else:
    print("Yes")
a, b, c = input()
s=set([a, b, c])
if len(s)==1:
  print("NO")
else:
  print("YES")
s = input()
if s.count("A") > 0 and s.count("B") > 0:
    print("YES")
else:
    print("NO")
n=input()

if n=="AAA" or n=="BBB":
  print("Yes")
else:
  print("No")
a = input()
if not a == "AAA" or a =="BBB":
  print("Yes")
else:
  print("No")
S = input()
if S == "AAA" or S == "BBB":
  print("NO")
else:
  print("Yes")
s=set(input())
if not len(s)%2==0:
	print("NO")
else:
	print("YES")
s=input()
if s=="ABA":
	print("Yes")
else:
	print()
s=input()
if s =='AAA' or s == 'BBB':
    print('Yes')
else:
    print('No')
s = input()

if s == "AAA" or "BBB":
	print("No")
else:
	print("Yes")
S = input()
print("Yes" if S != "AAA" or S != "BBB" else "No")
word = input().split()

x = 0

if word[1:1] != word[2:2] :
  x = x+1
  
if word[2:2] != word[0:0] :
  x = x+1
  
if word[0:0] != word[1:1] :
  x = x+1
  
if x == 0 : print("Yes")
else : print("No")
n = input()

if n == "AAA" or n == "BBB":
  print("NO")
else:
  print("YES")
S = list(input())

if set(['A','B']) >= set(S):
  print('Yes')
else:
  print('No')
  
#ABA
#BBA
#BBB
A = input()

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