#include <bits/stdc++.h>
using namespace std;
inline int toInt(string s) {
  int v;
  istringstream sin(s);
  sin >> v;
  return v;
}
template <class T>
inline string toString(T x) {
  ostringstream sout;
  sout << x;
  return sout.str();
}
inline int readInt() {
  int x;
  scanf("%d", &x);
  return x;
}
int cnt[100005];
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  for (int i = 0; i < (int)n; ++i) {
    int l, r;
    scanf("%d%d", &l, &r);
    r++;
    int ma = -1, mi = 1e9;
    for (int jump = 1; jump < (int)551; ++jump) {
      int tl = max((l - 1) / jump + 1, ma);
      int tr = min((r - 1) / jump + 1, mi);
      ma = max(ma, tr);
      mi = min(mi, tl);
      if (tl < tr) {
        cnt[tl]++;
        cnt[tr]--;
      }
      if (mi < 550) break;
    }
    for (int d = 1; d < (int)mi; ++d) {
      if (((l - 1) / d + 1) * d < r) {
        cnt[d]++;
        cnt[d + 1]--;
      }
    }
  }
  for (int i = 0; i < (int)m; ++i) cnt[i + 1] += cnt[i];
  for (int i = 0; i < (int)m; ++i) printf("%d\n", cnt[i + 1]);
  return 0;
}
