#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
using vi = vector<int>;
template <typename T>
ostream& operator<<(ostream& os, const vector<T>& v) {
  os << "sz=" << v.size() << "\n[";
  for (const auto& p : v) {
    os << p << ",";
  }
  os << "]\n";
  return os;
}
template <typename S, typename T>
ostream& operator<<(ostream& os, const pair<S, T>& p) {
  os << "(" << p.first << "," << p.second << ")";
  return os;
}
constexpr ll MOD = 1e9 + 7;
template <typename T>
constexpr T INF = numeric_limits<T>::max() / 100;
int main() {
  int N, M;
  cin >> N >> M;
  vector<pii> stops;
  for (int i = 1; i <= M; i++) {
    for (int j = 1; i * j <= M; j++) {
      stops.push_back(make_pair(i * j, i));
    }
  }
  sort(stops.begin(), stops.end());
  vector<int> count(M + 1, 0);
  for (int i = 0; i < N; i++) {
    int l, r;
    cin >> l >> r;
    unordered_set<int> st;
    for (const auto p : stops) {
      if (p.first < l) {
        continue;
      } else if (p.first > r) {
        break;
      } else {
        if (st.find(p.second) == st.end()) {
          count[p.second]++;
          st.insert(p.second);
        }
      }
    }
  }
  for (int i = 1; i <= M; i++) {
    cout << count[i] << endl;
  }
  return 0;
}
