#include #define rep(i,j,n) for(int i=j;i DX={0,1,0,-1,0,1,-1,-1,1}; //vector DY={0,0,1,0,-1,1,1,-1,-1}; int main(){ string S; cin >> S; int i=0; if(S[i]!=S[i+1]){ cout <<"No" << endl; return 0; } i++; if(S[i]==S[i+1]){ cout <<"No" << endl; return 0; } cout << "Yes" << endl; }