s = input() ok = False if s.count('1')==2 : ok = True if s.count('0')==2 : ok = True print("Yes" if ok else "No")