s = list(input()) print("Yes" if len(s) == 3 and s[0] == s[1] else "No")