#!/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 = eval(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")

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

for i in range(2):

  if s[i] != s[i+1]:

    count += 1

print(("Yes" if count >= 1 else "No"))
#!/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 = eval(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")

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 = eval(input())
for i in range(2):
    if s[i] != s[i + 1]:
        count += 1
print(("Yes" if count >= 1 else "No"))

-#!/usr/bin/env python3 -S = {"A", "B"} -s1 = {s[0], s[1]} -s2 = {s[2], s[1]} -if s1 == S or s2 == S: -    print("Yes") -else: -    print("No") +for i in range(2): +    if s[i] != s[i + 1]: +        count += 1 +print(("Yes" if count >= 1 else "No"))