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