#include #include using namespace std; bool in(stack s, int num){ bool found=false; while(!found && s.size()>0){ found=(s.top()==num); s.pop(); } return found; } int main(){ int num; cin>>num; while(num!=0){ stack s, orig; for(int i=num; i>0; i--) orig.push(i); bool possible=true, end=false; while(!end){ int x; cin>>x; if(x==0){ cout<>x; } possible? cout<<"Yes\n" : cout<<"No\n"; } } cin>>num; } }