#include <bits/stdc++.h>
using namespace std;
template <class T>
T to_T(const string &s) {
  istringstream is(s);
  T res;
  is >> res;
  return res;
}
template <class T>
string to_s(const T &a) {
  ostringstream os;
  os << a;
  return os.str();
}
void solve(long long N, long long M, vector<long long> l, vector<long long> r) {
  for (int i = (1); i < (M + 1); ++i) {
    long long ans = 0;
    for (int j = (0); j < (N); ++j) {
      long long buf = (r[j] / i) - (l[j] / i);
      if (buf > 0) ans++;
    }
    cout << ans << endl;
  }
}
int main() {
  ios::sync_with_stdio(false);
  long long N;
  long long M;
  cin >> N;
  vector<long long> r(N - 1 + 1);
  vector<long long> l(N - 1 + 1);
  cin >> M;
  for (int i = 0; i <= N - 1; i++) {
    cin >> l[i];
    l[i]--;
    cin >> r[i];
  }
  solve(N, M, l, r);
  return 0;
}
