#pragma GCC target("avx2") #pragma GCC optimize("Ofast") #pragma GCC optimize("unroll-loops") #include using namespace std; using ll = long long int; using ull = unsigned long long int; using ld = long double; int main(){ ios::sync_with_stdio(false); cin.tie(nullptr); string S; cin >> S; if(S[0] == S[1] && S[0] != S[2]) cout << "Yes" << endl; else cout << "No" << endl; }