#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);
      int lptr = lt, rptr = rt;
      for (int x = 2;; ++x) {
        int now_lptr = (lt + x - 1) / x, now_rptr = rt / x;
        if (now_rptr < lptr) {
          sum[lptr] += 1;
          sum[rptr + 1] -= 1;
          lptr = now_lptr;
          rptr = now_rptr;
        } else {
          lptr = now_lptr;
        }
        if (now_lptr <= rt - lt + 1) {
          lptr = 1;
          sum[lptr] += 1;
          sum[rptr + 1] -= 1;
          break;
        }
        if (now_lptr == now_rptr) {
          sum[lptr] += 1;
          sum[rptr + 1] -= 1;
          break;
        }
      }
    }
    for (int i : range(M)) sum[i + 1] += sum[i];
    for (int i : range(M)) {
      printf("%d\n", sum[i + 1]);
    }
  }
}
