n = list(input()) if n.count("1") == 2 or n.count("0") == 2: print('Yes') else: print('No')