peterverebics/CodeNet_Python_118 huggingface dataset:
s = input()
if s[0] == s[1] and s[1] == s[2]:
  print('No')
else:
  print('Yes')
S = input()
A = 0
B = 0

for s in S:
    if s == "A":
        A += 1
    else:
        B += 1
if A == 0 or B == 0:
    print("No")
else:
    print("Yes")
s = list(input())
if "A" in s and "B" in s:
  print("Yes")
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')
s=input()
if("A" in s and "B" in s):
  print("Yes")
else:
  print("No")
s = set(list(input()))
if len(s) == 1:
  print("No")
else:
  print("Yes")
s=input()
if s=="AAA" or s=="BBB":
	print("No")
else:
	print("Yes")
def main():
    import sys
    #input = sys.stdin.readline
    sys.setrecursionlimit(10000000)
    from collections import Counter, deque
    #from collections import defaultdict
    from itertools import combinations, permutations
    #from itertools import accumulate, product
    from bisect import bisect_left,bisect_right
    from math import floor, ceil
    #from operator import itemgetter

    #mod = 1000000007

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



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

if len(s) == s.count("A") or len(s) == s.count("B"):
  print("No")
else:
  print("Yes")
s = input()

if("A" not in s or "B" not in s):
    print("No")
else:
    print("Yes")
S = input()

if S.count('A') == 3 or S.count('B') == 3:
    print('No')
else:
    print('Yes')
#n, m, q = map(int, input().split())
#List = list(map(int, input().split()))
#req = [list(map(int, input().split())) for _ in range(q)]
#t = t[:-1]
#print(ans[j], end = "") 改行無しで出力
#[0]*n
s = input()

if s[0] == s[1] == s[2]:
    print("No")
else:
    print("Yes")
#!/usr/bin/env python3
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()
S = {"A","B"}
s1 = {s[0],s[1]}
s2 = {s[2],s[1]}
if s1 == S or s2 == S:
  print("Yes")
else:
  print("No")
if len(set(list(input()))) == 2:
    print('Yes')
else:
    print('No')
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)
s = input()
if s =='AAA' or s =='BBB':
    print('No')
else:
    print('Yes')
S = input()
print("No" if len(set(S))==1 else "Yes")
S = input()
if S == "AAA" or S == "BBB":
  print("No")
else:
  print("Yes")
s=list(input())
if len(set(s))==1:print('No')
else:print('Yes')
# coding: utf-8
def main():
    s = input()
    if s[0] == s[1] == s[2]:
        print("No")
    else:
        print("Yes")
if __name__ == '__main__':
    main()
A = input()
if A.count("A") == 3 or A.count("B") == 3:
	print("No")
else:
	print("Yes")
s =input()
if (s == "AAA") or (s == "BBB"):
  print("No")
else:
  print("Yes")
S = sorted(list(input().rstrip()))
r = 'Yes' if S[0] != S[2] else 'No'
print(r)
# input
S = input()

# process/output 
print("No" if S == "AAA" or S == "BBB" else "Yes")
s=input()
l=set(s)
if(len(l)==1):
    print("No")
else:
    print("Yes")
#!/usr/bin/env python
# coding: utf-8

def ri():
    return int(input())

def rl():
    return list(input().split())

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

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


if __name__ == '__main__':
    main()
s=input()

jud = s[0]

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

else:
    print('Yes')
S = list(input())

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

if stations[0] == stations[1] and stations[1] == stations[2]:
  print('No')
else:
  print('Yes')
S = str(input())
if S[0] == S[1] == S[2]:
  print('No')
else:
  print('Yes')
s = input()
if(s == "AAA" or s == "BBB"):
  print("No")
else:
  print("Yes")
import sys
s = input()
bf = s[0]
for i in s[1:]:
    if i != bf:
        print("Yes")
        sys.exit()
print("No")
S = input() # 文字列を変数に格納

if S[0] == S[1] and S[1] == S[2]:
    print("No")
else:
    print("Yes")
a = input("")
if "A" in a and "B" in a:
  print("Yes")
else:
  print("No")
import sys

s = sys.stdin.readline()

if 'A' in s and 'B' in s:
	print("Yes")
else:
	print("No")
S = str(input())
flag = 0
for i in range(len(S)-1):
    if S[i]!=S[i+1]:
        flag = 1
if flag == 1:
    print("Yes")
else:
    print("No")
S = str(input())
if S == 'AAA' or S == 'BBB':
    print('No')
else:
    print('Yes')
# A - Station and Bus
s = input()

cntA = 0
cntB = 0

for i in s:
    if i == 'A':
        cntA += 1

    else:
        cntB += 1

if cntA == 3 or cntB == 3:
    print('No')
else:
    print('Yes')
S=input()
if S=='AAA' or S=='BBB':
    print('No')
else:
    print('Yes')
S=input()
if S=="AAA" or S=="BBB" :
  print("No")
else:
  print("Yes")
S = input()

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

result = True

for i in range(len(S)-1):
   
    if S[i] != S[i+1]:
        result = True
        break
    elif S[i] == S[i+1]:
        result = False


if result == False:
    print("No")
else:
     print("Yes")
sta = input()
if 'A' in sta and 'B' in sta:
  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 s=='BBB' else 'Yes')
s = input()

if len(set(s)) == 1:
    ans = "No"
else:
    ans = "Yes"
print(ans)
s=input()
if s =='AAA' or s=='BBB':
    print('No')
else:
    print('Yes')
S=input()
if S[0] == S[1] ==S[2]:
    print('No')
else:
    print('Yes')
s = list(input())
ans = "No"
prev = s[0]
for i in s[1:]:
    if i != prev:
        ans = "Yes"
        break
    prev = i
print(ans)
m = input()
if m == 'AAA' or m == 'BBB':
    print('No')
else:
    print('Yes')
a = input()
if a == "AAA" or a == "BBB":
  print("No")
else:
  print("Yes")
s=set(input())
if len(s)==1:
  print("No")
else:
  print("Yes")
# /usr/bin/env python3


def judge(s):
    return s != "AAA" and s != "BBB"


def main():
    s = input()
    print("Yes" if judge(s) else "No")


if __name__ == "__main__":
    main()
S=input()
print("YNeos"[not(S[0]!=S[1] or S[1]!=S[2])::2])
print(' YNeos'['AAA'!=input()!='BBB'::2])
Sj = list(input())

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

if S=='AAA' or S=='BBB':
    print('No')
else:
    print('Yes')
S=input()
t=S[0]
for i in S:
    if t!=i:
        print("Yes")
        break
else:
    print("No")
S=input()

if S.count("A") and S.count("B"):
	print("Yes")
else:
	print("No")
s = input()
if s == 'AAA' or s == 'BBB':
  print('No')
else:
  print('Yes')
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**6)


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


main()
S = input()
if (S == 'AAA') or (S == 'BBB'):
  print("No")
else:
  print("Yes")
S = input()
if S=='AAA' or S == 'BBB':print('No')
else:print('Yes')
s = input()
if 'A' in s and 'B' in s:
    print('Yes')
else:
    print('No')
s = input()

a = s.count('A')
b = s.count('B')

if a>0 and b>0:
    print('Yes')
else:
    print('No')
N = len(set(input()))
print("Yes" if N==2 else "No")
import sys
input = sys.stdin.readline

s = input()

if s.count('B') == 0 or s.count('A') == 0:
    print("No")
else:
    print("Yes")
s=input()
if s[0]==s[1]==s[2] or s[0]==s[1]==s[2]:
  print("No")
else:
  print("Yes")
s=input()
if s.count("A")==3 or s.count("B")==3:
    print("No")
else:
    print("Yes")
def yesno(S):
  if S=="AAA" or S=="BBB":
    return "No"
  else:
    return "Yes"
  
S=input()
print(yesno(S))
str=input()
if str=='AAA' or str=='BBB':
	print('No') 
else:
	print('Yes')
s=list(input().strip())
x=s.count(s[0])
if x==0 or x==3:
    print('No')
else:
    print('Yes')
a=input()
c=0
c=a.count("AB")+a.count("BA")
if c==0:
    print("No")
else :
    print("Yes")
l = len(set(list(input())))
if l == 1:
    print("No")
else:
    print("Yes")
str = input().strip()
if(str[0] == str[1] and str[1] == str[2]):
  print('No')
else:
  print('Yes')
s=input()
if s=='AAA' or s=='BBB':
  print('No')
else:
  print('Yes')
S = list(input())
countA = 0
countB = 0

for i in range(0, len(S)):
    if S[i] == "A":
        countA += 1
    elif S[i] == "B":
        countB += 1

if countA == 3 or countB == 3:
    print("No")
else:
    print("Yes")
s_list = list(input())

uniq_s_list = set(s_list)

if len(uniq_s_list) > 1:
    print("Yes")
else:
    print('No')
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()
import collections
S = list(input())
c = collections.Counter(S)


if 0 < c['A'] < 3:
  print('Yes')
else:
  print('No')
s = input()

if len(set(s)) == 1:
  print('No')
else:
  print('Yes')
InpStr=str(input())
result='Yes'
# 処理
if InpStr[0]=='A' and InpStr[1]=='A' and InpStr[2]=='A':
    result='No'

if InpStr[0]=='B' and InpStr[1]=='B' and InpStr[2]=='B':
    result='No'

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

if 'A' in s and 'B' in s:
    print('Yes')
else:
    print('No')
S = input()
if S == 'AAA' or S == 'BBB':
  print('No')
else:
  print('Yes')
S = input()
print("YNeos"[S[0] == S[1] == S[2]::2])
S = input()
print('No' if S == 'AAA' or S == 'BBB' else 'Yes')
S = str(input())
if S == 'AAA':
    print('No')
elif S == 'BBB':
    print('No')
else:
    print('Yes')
s = input()
if s[0]==s[1]==s[2]:
  print("No")
else:
  print("Yes")
s = input()
print('No' if s == 'AAA' or s == 'BBB' else 'Yes')
A = input()
if A[0] == A[1] and A[1] == A[2]:
  print("No")
else:
  print("Yes")
s = input()
for i in range(2):
    if s[i] != s[i + 1]:
        print("Yes")
        exit(0)
print("No")
s = input()
if 'B' not in s or 'A' not in s:
    print('No')
else:
    print('Yes')
a=input()
b=len(a)
if a[0] == a[1] and a[1] == a[2]:
  print('No')
else:
  print('Yes')
s = input()
a = set()
for x in s:
    a.add(x)
if len(a) == 1:
    print('No')
else:
    print('Yes')
l = input()

if l == 'AAA':
    print('No')
elif l == 'BBB':
    print('No')
else:
    print('Yes')
a,b,c=input()
if a==b==c:
    print("No")
else:
    print("Yes")
import sys
lst_st = list(input())

for i in range(2):
  if (lst_st[i] != lst_st[i+1]):
    print("Yes")
    sys.exit()
  else:
    continue
else:
  print("No")
inp=input()
ans='Yes'
if inp=='AAA' or inp=='BBB':
  ans='No'
print(ans)
s = str(input())

if "A" in s:
    if "B" in s:
        print("Yes")
    else:
        print("No")
else:
    print("No")
s=list(input())

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

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

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

if (S=='AAA' or S=='BBB'):
    print('No')
else:
    print('Yes')
s = input()
print("No" if s[0] == s[1] and s[1] == s[2] else "Yes")
"""
    Author: _YL_
"""
#n, k = map(int, input().split())
lst = list(input())

n = len(lst)

i = 1
while i < n and lst[i] == lst[i-1]: i += 1

if i == n:
    print("No")
else:
    print("Yes")
S=input()
if S[0]==S[1] and S[1]==S[2]:
  print('No')
else:
  print('Yes')
S=raw_input()
if S[0]!=S[1] or S[0]!=S[2] or S[1]!=S[2]:
    print "Yes"
else:
    print "No"
s = input()

company = s[0]
bus_needed = False
for i in range(1, len(s)):
    if company != s[i]:
        bus_needed = True
print("Yes" if bus_needed else "No")
s = input()
if s=='AAA' or s =='BBB':
    print('No')
else:
    print('Yes')
S = str(input())

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

if ('A' in S)&('B' in S):
    print('Yes')
else:
    print('No')
s=str(input())
s=list(set(s))
if len(s)!=1:
  print("Yes")
else:
  print("No")
def main():
    s = input()
    if s[0]==s[1]==s[2]:
        print("No")
    else:
        print("Yes")

if __name__ == "__main__":
    main()
S=input()
if S[0]==S[1] and S[1]==S[2]:
  print("No")
else:
  print("Yes")
s=list(input())
if len(set(s))==1:
  print("No")
else:
  print("Yes")
def main():
    s = input().rstrip()
    if s[0] != s[1] or s[1] != s[2] or s[2] != s[0]:
        print("Yes")
    else:
        print("No")

if __name__ == "__main__":
    main()
S = input()
if 'A' not in S:
  print('No')
elif 'B' not in S:
  print('No')
else:
  print('Yes')
x = input()
print(["Yes","No"][(x == "AAA") | (x == "BBB")])
import sys
input = sys.stdin.readline
s = input().strip()
if 'A' in s and 'B' in s:
    print('Yes')
else:
    print('No')
x = input()
if x[0]==x[1] and x[1]==x[2]:
    print("No")
else:
    print("Yes")
a,b,c = list(input())
print("No") if a==b and b==c and c==a else print("Yes")
S = input()
if (S == 'AAA') or (S == 'BBB'):
    print('No')
else:
    print('Yes')
#! /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")
#[int(i) for i in input().split()]
s = input()
if s.count("A") != 0 and s.count("B") != 0:
    print("Yes")
else:
    print("No")
# coding: utf-8
# Your code here!
eki = str(input())
if eki[0] == "A" and eki[1] == "A" and eki[2] == "A":
    print("No")
elif eki[0] == "B" and eki[1] == "B" and eki[2] == "B":
    print("No")
else:
    print("Yes")
#ABC158
#A

S = input()

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

a = 0
b = 0
for x in s:
    if x == 'A':
        a += 1
    elif x == 'B':
        b += 1
if a == 3 or b == 3:
    print('No')
else:
    print('Yes')
S = input()
if len(set(S)) == 1:
    print('No')
else:
    print('Yes')
S = input()
ans = 'Yes'
if S == 'AAA':
    ans = ('No')
if S == 'BBB':
    ans = ('No')

print(ans)
S = list(input())
if len(set(S)) == 1:
  print("No")
else:
  print("Yes")
#abc158a
s=raw_input()
if s.count('A')==3 or s.count('B')==3:
 print 'No'
else:
 print 'Yes'
S = set([c for c in input()])

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

if S[0] == S[1] == S[2] == "A" or S[0] == S[1] == S[2] == "B":
    print("No")
else:
    print("Yes")
s = input()

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

tmp = S[0]
for i in range(3):
    if tmp !=S[i]:
        print("Yes")
        exit()
print("No")
s = input()
if ("A" in s) and ("B" in s):
  print("Yes")
else:
  print("No")
s = input()
if s == 'AAA' or s == 'BBB':
  print('No')

else:
  print('Yes')
S = input()

if(S == "AAA" or S == "BBB"):
    print("No")
else:
    print("Yes")
S = set(list(input()))
if len(S)==1:
    print("No")
else:
    print("Yes")
str = input()

answer = "No"
if 'B' in str and 'A' in str:
  answer = "Yes"
  
print(answer)
# ABC158 A
s=input()

if s.count('A')==3 or s.count('B')==3:
    print('No')
else:
    print('Yes')
# if s[0]=='A' and s[2]=='A':
#     print('Yes')
# elif s[0]=='B' and s[2]=='B':
#     print('No')
s=input()
if s[0]==s[1] and s[1]==s[2]:
    print('No')
else:
    print('Yes')
a=input()
len=len(a)
a_cnt=0
b_cnt=0
for i in range(len):
    if a[i]=='A':
        a_cnt+=1
    else :
        b_cnt+=1
if a_cnt>0 and b_cnt>0:
    print('Yes')
else :
    print('No')
S = input()
if S == 'AAA' or S == 'BBB':
    print("No")
else:
    print("Yes")
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()
s=list(input())
if s[0]!=s[1]:
  print("Yes")
elif s[1]!=s[2]:
    print("Yes")
else:
      print("No")
a=input()
print("No" if(a=="AAA" or a=="BBB") else "Yes")
s = input()
if 'A' in s and 'B' in s: print("Yes")
else: print("No")
s1, s2, s3 = input()
count = 0
if s1 != s2:
    count += 1
if s2 != s3:
    count += 1
if s1 != s3:
    count += 1
if count == 0:
    print('No')
else:
    print('Yes')
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')
s = raw_input()
if s[0] == s[1] and s[1] == s[2]:
  print "No"
else:
  print "Yes"
s=input()
ans="Yes"
if s=="AAA" or s=="BBB":
	ans="No"
print(ans)
s = input()
if s.count(s[0]) == 3:
	print("No")
else:
	print("Yes" )
S = str(input())
if S == 'AAA' or S=='BBB':
    print('No')
else:
    print('Yes')
s=input().strip()
s=sorted(s)
if s[0]==s[2]:
    print("No")
else:
    print("Yes")
s=input()
if s =='AAA' or s == 'BBB':
    print('No')
else:
    print('Yes')
S = input()

S_list = [i for i in S]
S_set = set(S_list)

if len(S_set) == 2:
  print('Yes')
else:
  print('No')
S=list(input())
A=set(S)
if len(A)==1:
  print("No")
else:
  print("Yes")
w = set(input())
if "A" in w and "B" in w :
    print("Yes")
else :
    print("No")
mogi = input()

first = mogi[0]
use_bus = False

for i in range(len(mogi)):
  if first != mogi[i]:
    use_bus = True
    break

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

if len(set(s)) == 1:
    print('No')
else:
    print('Yes')
S=input()
S=set(S)
if len(S)==2:
	print("Yes")
else:
	print("No")
s = list(input())
if s[0] == s[1] == s[2]:
  print("No")
else:
  print("Yes")
S=input()
if S[0:1]==S[1:2]==S[2:3]:
    print('No')
else:
    print('Yes')
s = input()
if s == "BBB":
  print("No")
elif s == "AAA":
  print("No")
else:
  print("Yes")
s = input()
if 'A' in s and 'B' in s:
  print('Yes')
else:
  print('No')
s=input()
if 'A' in s and 'B' in s:
  print("Yes")
else:
  print("No")
# -*- coding: utf-8 -*-
"""
Challenge A
"""
import numpy as np

def bus(stations):
    a = np.array(("","",""))
    for i in range(3):
        a[i] = stations[i]
    s = np.unique(a)
    if len(s)==1:
        return "No"
    elif len(s) > 1:
        return "Yes"
    else:
        return "Problem"
        
"""
my_strings = np.array(("AAA","AAB","ABA","BAA","ABB","BBA","BBB"))
for i in my_strings:
    print(i)
    print(bus(i))
"""
    
i = input()
#print(i)
print(bus(i))
SSS = input()
KKK = "No"
NNN = []
NNN = list(SSS)
if NNN[0] != NNN[1] or NNN[0] != NNN[2]:
    KKK = "Yes"
print(KKK)
S=input()

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

print("Yes" if S != "AAA" and S != "BBB" else "No")
x = set(list(input()))
print('No' if len(x)==1 else 'Yes')
S = input()

if S.count('A') >= 1 and S.count('B') >= 1:
  print('Yes')
else:
  print('No')
#python3

def main():
    s = input()
    if s == 'AAA' or s == 'BBB':
        print('No')
    else:
        print('Yes')
main()
s = input().strip()
if "A" in s and "B" in s:
  print("Yes")
else:
  print("No")
S = input()

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

if 'AB' in S or 'BA' in S:
  print('Yes')
else:
  print('No')
s = str(input())
if s[0] == s[1] == s[2]:
    print('No')
else:
    print('Yes')
S = input()
if ('A' in S) and ('B' in S):
    print('Yes')
else:
    print('No')
A=input()
if 'B' in A:
	if 'A' in A:
		print('Yes')
	else:
		print('No')
else:
	print('No')
s = input()
a_count = s.count('A')
b_count = s.count('B')
if a_count == 3 or b_count == 3:
    print('No')
else:
    print('Yes')
if len(set(input()))==2:
  print("Yes")
else:
  print("No")
S=input()
if S[0]==S[1]==S[2]:
	print("No")
else:
	print("Yes")
s = input()
if s == 'AAA' or s == 'BBB':
	print('No')
else:
	print('Yes')
a=input()
if a[0]==a[1]==a[2]:
  print("No")
else:
  print("Yes")
S = input()
if S[0] == S[1] and S[0] == S[2]:
    print('No')
else:
    print('Yes')
s = input()
if s == "AAA" or s == "BBB":
  print("No")
else:
  print("Yes")
S = input()

if S[0] == S[1] and S[0] == S[2]:
    print('No')
else:
    print('Yes')
a = input()
if a.count('B') == 3 or a.count('A') == 3:
    print("No")
else:
    print("Yes")
s = input()
print('NYoe s'['A' in s and 'B' in s::2])
s = input()
if s.count("A") and s.count("B"):
  print("Yes")
else:
  print("No")
S = input()
if S in ['AAA', 'BBB']:
    print('No')
else:
    print('Yes')
s = input()
if s[0] == s[1] == s[2]:
  print('No')
else:
  print('Yes')
S = input()

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

if "A" in s and "B" in s:
    print("Yes")
else:
    print("No")
S = str(input())
if S[0] == S[1] == S[2]:
    print("No")
else:
    print("Yes")
#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")
S = list(i for i in input())
 
if 'A' in S and 'B' in S:
  print('Yes')
else:
  print('No')
s = list(input())
if s.count("A") == len(s) or s.count("A") == 0:
  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


# %%
any([one_two, two_three, three_one])


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


# %%
s = str(input())
s_list = list(s)
if 'A' in s_list and 'B' in s_list:
    print('Yes')
else:
    print('No')
s = input()
if s.count('A') == 0 or s.count('B') ==0:
  print("No")
else:
  print("Yes")
s=input()

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

if char_list[0] == char_list[1] and char_list[1] == char_list[2]:
    print('No')
else:
    print('Yes')
s=input()
if s[0]==s[1] and s[1]==s[2] :print("No")
else: print("Yes")
S = input()
if S[0] == S[1] == S[2]:
  print('No')
else:
  print('Yes')
S = input()
if ('A' in S) and ('B' in S):
  print('Yes')
else:
  print('No')
S = input()

if S == "AAA" or S == "BBB":
  print("no")
  
else:
  print("yes")
s = input()

if s=='AAA' or s == 'BBB':
    print('NO')
else:
    print('YES')
S = input()

if S == 'ABA':
    print('Yes')
elif S == 'BAB':
    print('Yes')
else:
    print('No')
a = 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[1] and S[1] == S[2]:
  print('Yes')
else:
  print('No')
S=map(str,input())
if "A" in S:
    print("yes")
else :
    print("no")
def a(s):

    return "Yes" if s.count("A") != 0 else "No"


def main():
    s = str(input())
    print(a(s))

if __name__ == '__main__':
    main()
s = input()

if s == 'AAA':
	print('No')
if s == 'BBB':
	print('No')
else:
	print('Yes')
if __name__== '__main__':
  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')
s=input()
print("YNeos"[s != len(s) * s[0]::2])
x = set(input().split())
print('No' if len(x)==1 else 'Yes')
S = list(input())
if S.count('A')==2 or S.count('B')==2:
    if S[0]==S[2]:
        print('Yes')
    else:
        print('No')
else:
    print('No')
S = input();

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

a = 3
b = sys.argv

print(a)
print(b)
s = input().split()
n = 0
for i in range(len(s) - 1):
  if s[i] != s[i + 1]:
    n += 1
if n >= 1:
  print('Yes')
else:
  print('No')
S=input()
if("AAA"==S or S=="BBB"):
  print("Yes")
else:
  print("No")