#include<stdio.h>
#include<algorithm>
using namespace std;
int tree[400005],S[100005];

int up(int x, int y)
{
    return (x-1)/y+1;
}

int down(int x, int y)
{
    return x/y;
}

int main()
{
    int n,m,l,r,i,j,R,Ri,Li;
    scanf("%d %d", &n, &m);
    for(i=1;i<=n;i++){
        scanf("%d %d", &l, &r);
        R=0;
        while(R*R<=l)R++;
        R--;
        Ri=m;
        for(j=1;j<=R;j++){
            Ri=min(Ri,r/j);
            Li=up(l,j);
            S[Ri+1]--;
            S[Li]++;
            Ri=Li-1;
        }
        for(j=1;j<=Ri;j++){
            if(r/j>(l-1)/j)S[j]++,S[j+1]--;
        }
    }
    for(i=1;i<=m;i++){
        S[i]+=S[i-1];
        printf("%d\n", S[i]);
    }
    return 0;
}
