# import bisect

# from collections import Counter, deque

# import copy

# from heapq import heappush, heappop, heapify

# from fractions import gcd

# import itertools

# from operator import attrgetter, itemgetter

# import math



import sys



# import numpy as np



ipti = sys.stdin.readline

MOD = 10 ** 9 + 7

INF = float('INF')

sys.setrecursionlimit(10 ** 5)



def main():

    s = input()

    ss = set(s)



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



if __name__ == '__main__':

    main()

s = eval(input())



if s == "AAA" or s == "BBB":

    print("No")

else:

    print("Yes")
# import bisect
# from collections import Counter, deque
# import copy
# from heapq import heappush, heappop, heapify
# from fractions import gcd
# import itertools
# from operator import attrgetter, itemgetter
# import math
import sys

# import numpy as np
ipti = sys.stdin.readline
MOD = 10**9 + 7
INF = float("INF")
sys.setrecursionlimit(10**5)


def main():
    s = input()
    ss = set(s)
    print("Yes") if len(ss) == 2 else print("No")


if __name__ == "__main__":
    main()

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

-# import bisect -# from collections import Counter, deque -# import copy -# from heapq import heappush, heappop, heapify -# from fractions import gcd -# import itertools -# from operator import attrgetter, itemgetter -# import math -import sys - -# import numpy as np -ipti = sys.stdin.readline -MOD = 10**9 + 7 -INF = float("INF") -sys.setrecursionlimit(10**5) - - -def main(): -    s = input() -    ss = set(s) -    print("Yes") if len(ss) == 2 else print("No") - - -if __name__ == "__main__": -    main() +s = eval(input()) +if s == "AAA" or s == "BBB": +    print("No") +else: +    print("Yes")