#include #include #include #include #include #include #include #include #include #include #include #include using namespace std; using ll = long long; int main(){ string S; cin >> S; if (S[0] == S[1] && S[1] != S[2]) cout << "Yes" << endl; else cout << "No" << endl; return 0; }