#include using namespace std; #define modulo 1000000007 #define mod(mod_x) ((((long long)mod_x)+modulo)%modulo) #define Inf 1000000000000 bool check(string S){ while(S.size()!=0&&S[0]==' ')S.erase(S.begin()); if(S.size()==0)return false; for(int i=0;true;i++){ if(i%2==0){ if(S[0]==' ')break; } else{ if(S[0]!=' ')return false; } S.erase(S.begin()); if(S.size()==0)break; } for(int i=0;i=j)T = trans(T,T[k]); } if(check(T)){ cout<<"Yes"<