#include #include #include #include using namespace std; mapp; inline int read() { char ch=getchar();int x=0,f=1; while(ch>'9'||ch<'0'){if(ch=='-')f=-1;ch=getchar();} while(ch<='9'&&ch>='0'){x=x*10+ch-'0';ch=getchar();} return x*f; } int main(){ int n,m; while(~scanf("%d %d",&n,&m)){ int t; p.clear(); for(int i=0;i