#include <bits/stdc++.h>
using namespace std;
template <typename T>
bool setmin(T& a, T b) {
  if (a <= b) {
    return false;
  } else {
    a = b;
    return true;
  }
}
template <typename T>
bool setmax(T& a, T b) {
  if (b <= a) {
    return false;
  } else {
    a = b;
    return true;
  }
}
template <typename T>
T gcd(T a, T b) {
  return (b == 0 ? a : gcd(b, a % b));
}
template <typename T>
T lcm(T a, T b) {
  return a / gcd(a, b) * b;
}
template <typename T>
ostream& operator<<(ostream& os, const vector<T>& v) {
  os << "[";
  for (auto it = v.begin(); it != v.end(); ++it) {
    if (it != v.begin()) {
      os << ", ";
    }
    os << *it;
  }
  os << "]";
  return os;
}
template <typename F, typename S>
ostream& operator<<(ostream& os, const pair<F, S>& p) {
  os << "<" << p.first << ", " << p.second << ">";
  return os;
}
int n, m, l[300000], r[300000];
int ans[100002];
int main() {
  cin >> n >> m;
  for (int i = (0); i < (n); i++) {
    cin >> l[i] >> r[i];
  }
  for (int i = (0); i < (n); i++) {
    if ((l[i] - 1) * 2 <= r[i]) {
      ans[1]++;
      ans[r[i] + 1]--;
    } else {
      int llim = (r[i] + 1) - l[i] + 1;
      int rlim = m + 2;
      ans[1]++;
      ans[llim]--;
      for (int d = (1); d <= (m); d++) {
        bool flag = false;
        int nl = (l[i] + (d - 1)) / d;
        int nr = (r[i] + 1 + (d - 1)) / d;
        if (nl <= llim) {
          flag = true;
        }
        setmax(nl, llim);
        setmin(nr, rlim);
        ans[nl]++;
        ans[nr]--;
        rlim = nl;
        if (flag) {
          break;
        }
      }
    }
  }
  for (int i = (1); i <= (m); i++) {
    ans[i] += ans[i - 1];
    cout << ans[i] << "\n";
  }
  return 0;
}
