#include <bits/stdc++.h>
using namespace std;
const int maxn = 3e5 + 10;
int n, m, Ans[maxn], vis[maxn];
int main() {
  long long ST = clock();
  int i, j, l, r, x;
  scanf("%d%d", &n, &m);
  for (i = 1; i <= n; i++) {
    scanf("%d%d", &l, &r);
    if (!l) {
      Ans[1]++;
      continue;
    }
    int _r = (int)sqrt(r);
    int u = (l + r - l) / (r - l + 1), v = r;
    Ans[u]++, Ans[v + 1]--;
    int last = u;
    for (j = u; j <= _r && vis[j] != i; j++) vis[j] = i;
    for (x = r - l + 1 + 1; x <= _r; x++) {
      int u = (l + x - 1) / x, v = r / x;
      if (u <= v) {
        if (v < last)
          Ans[u]++, Ans[v + 1]--;
        else
          Ans[u]++, Ans[last]--;
        last = u;
        for (j = u; j <= v && j <= _r && vis[j] != i; j++) vis[j] = i;
      }
    }
    for (x = 1; x <= _r; x++) {
      int u = (l + x - 1) / x, v = r / x;
      if (u <= v && vis[x] != i) vis[x] = i, Ans[x]++, Ans[x + 1]--;
    }
  }
  for (i = 1; i <= m; i++) Ans[i] += Ans[i - 1], printf("%d\n", Ans[i]);
}
