//yukicoder No.3779 #include // cout, endl, cin #include // string, to_string, stoi #include // vector #include // min, max, swap, sort, reverse, lower_bound, upper_bound #include // pair, make_pair #include // tuple, make_tuple #include // int64_t, int*_t #include // printf #include // map #include // queue, priority_queue #include // set #include // stack #include // deque #include // unordered_map #include // unordered_set #include // bitset #include // isupper, islower, isdigit, toupper, tolower #include // setprecision ? #include #include #include #include //#include using namespace std; typedef int64_t ll; //出力 void print(bool b){ if(b)cout<<"Yes"< V){ for(auto i=V.begin();i!=V.end();i++)cout<<*i<<(next(i)==V.end() ? "" : " "); cout<> V){ for(auto &v:V)print(v); return; } //ここまでがテンプレーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー bool make_(int a,multiset &S){ //cerr<<" make_ is called a="<=0;i--){ if(!S.count(i)){ bool b=make_(i,S); if(!b)return false; } auto itr=S.find(i); //cerr<<" erase "< S){ //cerr<<"solve is called ans="<=0;i--){ //cerr<<" i="<>t; while(t--){ int n; cin>>n; multiset S; for(int i=0;i>a; S.insert(a); } if(S.size()==1){ cout<