import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
S = readline().decode()
if 'A' in S and 'B' in S:
    print('Yes')
else:
    print('No')

000c0e8b20f6536a8cc6af96f0c264d01272f262
<mask token>

<mask token>
if 'A' in S and 'B' in S:
    print('Yes')
else:
    print('No')

<mask token>
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
S = readline().decode()
if 'A' in S and 'B' in S:
    print('Yes')
else:
    print('No')

import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
S = readline().decode()
if 'A' in S and 'B' in S:
    print('Yes')
else:
    print('No')
