void Cin(int &x) { char c=getchar();x=0; int y=1; while(c<'0'||c>'9') { if(c=='-') y=-1; c=getchar(); } while(c<='9'&&c>='0')x=x*10+c-'0',c=getchar(); x*=y; }