#include <bits/stdc++.h>
using namespace std;
using LL = long long;
using VI = vector<int>;
using VVI = vector<VI>;
using VL = vector<LL>;
using VVL = vector<VL>;
using VD = vector<double>;
using VVD = vector<VD>;
using PII = pair<int, int>;
using PDD = pair<double, double>;
using PLL = pair<LL, LL>;
using VPII = vector<PII>;
template <typename T>
using VT = vector<T>;
template <typename T>
inline bool chmax(T &a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
template <typename T>
inline bool chmin(T &a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
const int INF = 1e9;
const int MOD = INF + 7;
const LL LLINF = 1e18;
const int MAX = 3 * 1e5 + 10;
int N, M;
int l[MAX], r[MAX];
unordered_set<int> pl[MAX], mn[MAX];
unordered_set<int> imos[MAX];
int main(void) {
  clock_t start = clock();
  scanf("%d%d", &N, &M);
  for (int(i) = 0; (i) < (N); (i)++) {
    scanf("%d%d", l + i, r + i);
    pl[l[i]].insert(i);
    mn[r[i] + 1].insert(i);
  }
  for (int(i) = (1); (i) < (MAX); (i)++) {
    imos[i].insert(begin((imos[i - 1])), end((imos[i - 1])));
    imos[i].insert(begin((pl[i])), end((pl[i])));
    for (auto &&e : (mn[i])) imos[i].erase(e);
  }
  if ((clock() - start) / CLOCKS_PER_SEC > 2) assert(false);
  for (int(d) = (1); (d) < (M + 1); (d)++) {
    set<int> se;
    for (int i = 0; i <= M; i += d) {
      se.insert(begin((imos[i])), end((imos[i])));
    }
    printf("%d\n", se.size());
  }
}
