#include #include #include #include #include #include #include #include #include #include using namespace std; typedef long long ll; const ll INF=1LL<<60; typedef pair P; typedef pair PP; const ll MOD=998244353; int main(){ string S; cin>>S; if(S[0]==S[1] && S[1]!=S[2]){ cout<<"Yes"<