#include #include #include #include #include #include #include #include #include #include #include #include using namespace std; typedef long long ll; typedef unsigned long long ull; #define mem(a,num) memset(a,num,sizeof(a)) #define inf(a,n) fill(a,a+n,0x3f3f3f3f) int main() { int n,m,x,y,c; ll cnt[3050]; while(scanf("%d%d",&n,&m)!=EOF){ mem(cnt,0); for(int i=0;i