#include #include #include using namespace std; int main(){ string S; cin>>S; assert(S.size()==3&& 'A'<=S[0]<='Z'&& 'A'<=S[1]<='Z'&& 'A'<=S[2]<='Z'); if(S[0]==S[1]&&S[1]!=S[2]){ cout<<"Yes"<