char buf[MAXN],*ps=buf,*pe=ps+1;
inline void rnext(){//读优
if(++ps==pe)
pe=(ps=buf)+fread(buf,1,sizeof(buf),stdin);
}
inline int in(int x=0,char ch=getchar(),int v=1){
while(ch!='-'&&(ch>'9'||ch<'0')) ch=getchar();if(ch=='-') v=-1,ch=getchar();
while(ch>='0'&&ch<='9') x=(x<<3)+(x<<1)+ch-'0',ch=getchar();return x*v;}
void out(int x){
int l=0;char ch[64];
if(!x){putchar('0');return;}
if(x<0)putchar('-'),x=-x;
while(x) ch[++l]=x%10+'0',x/=10;
for(int i=l;i;i--) putchar(ch[i]);
}