#include using namespace std; using ll=long long; using Pa=pair; using Vll=vector; using VVll=vector; using Vb=vector; using VVb=vector>; using Vs=vector; using VVs =vector>; using Vc=vector; using VVc =vector>; const ll MOD=1000000007; const ll INF=(ll)1<<60;// 10^18 < 1<<60 = 1152921504606846976 // VVll G(N+1,Vll(0)); // vector event; event.emplace_back(a,b); // 以下の関数 oi:エラー出力 OI:正出力 OIV:1次元vector正出力 OIVV:2次元vector正出力 template bool chmax(t&a,u b){if(a bool chmin(t&a,u b){if(bvoid oi(Head&& head,Tail&&... tail){if(sizeof...(tail)!=0){cerr<void OI(Head&& head,Tail&&... tail){if(sizeof...(tail)!=0){cout< void OIV(T &a){if(a.empty()){cout<<"\n"; return;} for(ll i00=0;i00<(a).size();i00++){if(a[i00]==(ll)1<<60){cout<<"I";} else{cout< void OIVV(T &a){if(a.empty()){cout<<"\n"; return;} for(ll i00=0;i00<(a).size();i00++){for(ll j00=0;j00<(a[i00]).size();j00++){if(a[i00][j00]==(ll)1<<60){cout<<"I";} else{cout<>S; ll N=S.size(); ll cnt=0; FOR(i,0,N){ if(S[i]=='1') cnt+=1; } if(cnt==2){ OI("Yes"); return 0; } else if(cnt==1){ OI("No"); return 0; } // 000 111111 00 // 001 000000 00 // 000 000000 00 // など固まっていればできる ll mode=0; FOR(i,0,N){ if(mode==0){ if(S[i]=='1') mode=1; } else if(mode==1){ if(S[i]=='0') mode=2; } else if(mode==2){ if(S[i]=='1') mode=100; } } if(mode==1 or mode==2) OI("Yes"); else OI("No"); return 0; }