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