A = input() S = f"{A}" if S[1] == S[2]: print("Yes") else: print("No")