#include <cstdio>
#include <cctype>
#include <algorithm>
#define repu(i,x,y) for (int i=x; i<=y; ++i)
using namespace std;

int n,tot,ans[100100],bit[100100];
struct data
{
    int l,r,id;
    bool operator<(const data &t) const
    {
        return l>t.l || l==t.l && !id;
    }
} a[15000100];

int getint()
{
    char ch;
    while (!isdigit(ch=getchar()));
    int x=ch-'0';
    for (; isdigit(ch=getchar()); x=x*10+ch-'0');
    return x;
}

void add(int x)
{
    for (; x<=n; ++bit[x],x+=x&-x);
}

int query(int x)
{
    int ret=0;
    for (; x; ret+=bit[x],x-=x&-x);
    return ret;
}

int main()
{
    scanf("%d%d",&tot,&n);
    repu(i,1,tot)
        a[i].l=getint(),a[i].r=getint();
    repu(i,1,n)
        ans[i]=tot;
    repu(i,2,n)
        for (int j=0; j<n; j+=i)
            a[++tot]=(data){j+1,min(j+i-1,n),i};
    sort(a+1,a+1+tot);
    repu(i,1,tot)
        if (a[i].id)
            ans[a[i].id]-=query(a[i].r);
        else
            add(a[i].r);
    repu(i,1,n)
        printf("%d\n",ans[i]);
    return 0;
}