#include <bits/stdc++.h>
using namespace std;
using ll = long long;
class range {
 private:
  struct I {
    int x;
    int operator*() { return x; }
    bool operator!=(I& lhs) { return x < lhs.x; }
    void operator++() { ++x; }
  };
  I i, n;

 public:
  range(int n) : i({0}), n({n}) {}
  range(int i, int n) : i({i}), n({n}) {}
  I& begin() { return i; }
  I& end() { return n; }
};
int main() {
  int N, M;
  while (scanf("%d%d", &N, &M) != EOF) {
    vector<int> sum(M + 10);
    for (int t : range(N)) {
      int lt, rt;
      scanf("%d%d", &lt, &rt);
      std::vector<pair<int, int>> intervals;
      const int th = 400;
      for (int x = 1;; ++x) {
        int now_lptr = (lt + x - 1) / x, now_rptr = rt / x;
        if (now_rptr < th) break;
        now_lptr = max(th + 1, now_lptr);
        if (now_lptr <= now_rptr) {
          intervals.push_back({now_lptr, now_rptr});
        }
      }
      for (int d = th; d >= 1; --d) {
        int y = d * (rt / d);
        if (y >= lt) {
          intervals.push_back({d, d});
        }
      }
      reverse(intervals.begin(), intervals.end());
      for (int i : range(intervals.size())) {
        auto p = intervals[i];
        if (i == 0) {
          sum[p.first]++;
          sum[p.second + 1]--;
        } else {
          auto p2 = intervals[i - 1];
          if (p.first <= p2.second) {
            sum[p2.second + 1]++;
            sum[p.second + 1]--;
          } else {
            sum[p.first]++;
            sum[p.second + 1]--;
          }
        }
      }
    }
    for (int i : range(M)) sum[i + 1] += sum[i];
    for (int i : range(M)) {
      printf("%d\n", sum[i + 1]);
    }
  }
}
