#include <bits/stdc++.h>
using namespace std;
template <typename Arg1>
void __f(const char* name, Arg1&& arg1) {
  cerr << name << ": " << arg1 << endl;
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args) {
  const char* comma = strchr(names + 1, ',');
  cerr.write(names, comma - names) << ": " << arg1 << " |";
  __f(comma + 1, args...);
}
const int INF = 1 << 29;
const int MOD = 1e9 + 7;
const int N = 1e5 + 10;
int c[N];
void insert(pair<int, int>& cur) {
  int L = cur.first, R = cur.second;
  c[L]++;
  c[R + 1]--;
}
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  for (int i = 0; i < n; ++i) {
    __f("i", i);
    int L, R;
    scanf("%d%d", &L, &R);
    pair<int, int> pre = {L, R};
    for (int k = 2;; ++k) {
      pair<int, int> cur = {(L + k - 1) / k, R / k};
      if (cur.second + 1 >= pre.first) {
        pre.first = 1;
        insert(pre);
        break;
      } else {
        insert(pre);
        pre = cur;
      }
    }
  }
  for (int i = 1; i <= m; ++i) {
    if (i > 1) c[i] += c[i - 1];
    printf("%d\n", c[i]);
  }
  return 0;
}
