// #define _GLIBCXX_DEBUG #include using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); ++i) int main() { // Input string S; cin >> S; // Output cout << (S[0] == S[1] && S[1] != S[2] ? "Yes" : "No") << endl; }