#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <algorithm>
#include <cmath>
#define LL long long
#define lowbit(x) ((x)&-(x))
using namespace std;
const int MAX = 300010;
struct segment
{
    int l,r;
    bool operator < (const segment&a)
    {
        return r-l < a.r-a.l;
    }
}seg[MAX];
int N,M,v[MAX],s[MAX];
void adt(int x,int y)
{
    for (;x<=N;x+=lowbit(x)) s[x] += y;
}
int query(int x)
{
    int sum = 0;
    for (;x>0;x-=lowbit(x)) sum += s[x];
    return sum;
}
int main(void)
{
    while (~scanf("%d%d",&N,&M))
    {
        for (int i=0;i<N;i++) scanf("%d%d",&seg[i].l,&seg[i].r);
        sort(seg,seg+N);
        memset(s,0,sizeof(s));
        memset(v,0,sizeof(v));
        int d, lim = sqrt(N)*M*sqrt(log2(M));
        for (d=1;d<=lim;d++)
        {
            for (int i=0;i<N;i++) if (seg[i].r/d > (seg[i].l-1)/d) v[d]++;
        }
        int i=0;
        for (;d<=M;d++)
        {
            for (;seg[i].r-seg[i].l+1<=d;i++)
            {
                adt(seg[i].r,1);
                if (seg[i].l-1>0) adt(seg[i].l-1,-1);
            }
            for (int i=1;(LL)i*d<=(LL)M;i++) v[d] += query(i*d);
            v[d] += N-i;
        }
        for (int i=1;i<=M;i++) printf("%d\n",v[i]);
    }
    return 0;
}