#include <bits/stdc++.h>
const double PI = 3.14159265358979323846;
using namespace std;
const double EPS = 1e-9;
const long long INF = 10e17;
std::istream &operator>>(std::istream &in, set<int> &o) {
  long long a;
  in >> a;
  o.insert(a);
  return in;
}
std::istream &operator>>(std::istream &in, queue<int> &o) {
  long long a;
  in >> a;
  o.push(a);
  return in;
}
bool contain(set<int> &s, int a) { return s.find(a) != s.end(); }
class CumulativeSum {
  vector<long long> numbers;
  vector<long long> sums;

 public:
  CumulativeSum(int n) {
    numbers.resize(n);
    sums.resize(n);
  }
  void set(int i, long long value) { numbers[i] = value; }
  long long getSum(int i) {
    if (i == -1) return 0;
    if (i == sums.size()) return sums.back();
    return sums[i];
  }
  long long getSectionSum(int start, int end) {
    return getSum(end) - getSum(start - 1);
  }
  void calculate() {
    for (int i = 0; i < numbers.size(); i++) {
      sums[i] = getSum(i - 1) + numbers[i];
    }
  }
};
int main() {
  int n, m;
  cin >> n >> m;
  vector<pair<long long, long long>> v(n);
  for (pair<long long, long long> &p : v) cin >> p.first >> p.second;
  map<int, vector<pair<long long, long long>>> g;
  for (pair<long long, long long> p : v) g[p.second - p.first + 1].push_back(p);
  int a = n;
  for (int k = 1; k <= m; k++) {
    a -= g[k - 1].size();
    int b = 0;
    vector<int> imos(m + 2, 0);
    for (pair<long long, long long> p : v) {
      if (!(p.second - p.first + 1 >= k)) {
        imos[p.first]++;
        imos[p.second + 1]--;
      }
    }
    CumulativeSum cs(m + 2);
    for (int i = 0; i < (m + 1); ++i) cs.set(i, imos[i]);
    cs.calculate();
    for (int j = 0; j <= m; j += k) {
      b += cs.getSum(j);
    }
    cout << a + b << endl;
  }
}
