#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using PII = pair<int, int>;
class Union_find {
 private:
  vector<int> par;
  vector<int> rank;
  int n;

 public:
  Union_find(int a) {
    n = a;
    for (int i = 0; i < n; i++) {
      par.push_back(i);
      rank.push_back(0);
    }
  }
  int find(int x) {
    if (par[x] == x) {
      return x;
    } else {
      return par[x] = find(par[x]);
    }
  }
  void unite(int x, int y) {
    x = find(x);
    y = find(y);
    if (x == y) return;
    if (rank[x] < rank[y]) {
      par[x] = y;
    } else {
      par[y] = x;
      if (rank[x] == rank[y]) rank[x]++;
    }
  }
  bool same(int x, int y) { return find(x) == find(y); }
};
ll mod = 1e9 + 7;
ll powm(ll x, ll a) {
  ll res = 1;
  for (int i = 0; i < (a); i++) {
    res = (res * x) % mod;
  }
  return res;
}
int main(void) {
  int N, M;
  int d[100010] = {};
  cin >> N >> M;
  for (int i = 0; i < (N); i++) {
    int l, r;
    cin >> l >> r;
    for (int j = (1); j < (r + 1); j++) {
      if ((l % j == 0 || r % j == 0) || (r % j) - (l % j) != r - l ||
          (l == r && l % j == 0)) {
        d[j]++;
        int a = j - (l % j);
        d[((r - a) / ((l + a) / j))];
      }
    }
  }
  for (int i = (1); i < (M + 1); i++) {
    cout << d[i] << endl;
  }
}
