#include <cstdio>
#define M 5010
#define N 200010
long long f[2*M];
long long fa[M],fb[M];
int n,m;
int main(){
freopen("Convoluted_Intervals.in","r",stdin);
freopen("Convoluted_Intervals.out","w",stdout);
scanf("%d%d",&n,&m);
for(int i = 0;i < n;i++){
int a,b;
scanf("%d%d",&a,&b);
fa[a]++;
fb[b]++;
}
for(int i = 0;i <= m;i++)
for(int j = 0;j <= m;j++){
f[i+j] += fa[i]*fa[j];
f[i+j+1] -= fb[i]*fb[j];
}
long long ans = 0;
for(int i = 0;i <=2 * m;i++)
printf("%lld\n",ans += f[i]);
return 0;
}