#pragma GCC optimize("Ofast") #pragma GCC target("avx2") char*mmap(); #define rd(v) int v=0;{int _c;while(_c=*rp++-48,_c>=0)v=v*10+_c;} char wbuf[1<<20],*wend=wbuf+sizeof wbuf; main(){ char*rp=mmap(0l,1l<<28,1,2,0,0ll); char*wp1=wbuf; char*wp2=wend; memcpy(wp1,"Yes\n",4); wp1+=4; rd(n); int a1; { int ai=0; char*rp1=rp; for(int c;c=*rp1++-48,c>=0;)ai=(ai<<4)|c; a1=ai; } for(int i=0;i=0;)ai=(ai<<4)|c; int l=rp1-rp-1; if(ai>a1){ memcpy(wp1,rp,l); wp1+=l; *wp1++=32; }else{ *--wp2=32; memcpy(wp2-=l,rp,l); } rp=rp1; } int an; { int ai=0; char*rp1=rp; for(int c;c=*rp1++-48,c>=0;)ai=(ai<<4)|c; an=ai; } if(an