#include <bits/stdc++.h>
using namespace std;
template <typename T>
string to_string(const vector<T> &xs) {
  string s = "[";
  for (int i = 0; i < xs.size(); i++)
    s += (i > 0 ? " " : "") + to_string(xs[i]);
  return s + "]";
}
template <typename T>
long long int argmax(const T &xs) {
  return distance(xs.begin(), max_element(xs.begin(), xs.end()));
}
template <typename T>
long long int argmin(const T &xs) {
  return distance(xs.begin(), min_element(xs.begin(), xs.end()));
}
long long int nextLL() {
  long long int x;
  scanf("%lld", &x);
  return x;
}
int nextInt() {
  int x;
  scanf("%ld", &x);
  return x;
}
string nextString() {
  string s;
  cin >> s;
  return s;
}
long long int extgcd(long long int a, long long int b, long long int &x,
                     long long int &y) {
  long long int g = a;
  x = 1;
  y = 0;
  if (b != 0) g = extgcd(b, a % b, y, x), y -= (a / b) * x;
  return g;
}
long long int gcd(long long int a, long long int b) {
  long long int x, y;
  return extgcd(a, b, x, y);
}
class llm {
  long long int n;

 public:
  llm() { n = 0; }
  llm(long long int n) {
    this->n =
        (n >= 0) ? (n % 1000000007) : (1000000007 - 1 - (-n - 1 % 1000000007));
  }
  operator long long int() const { return n; }
  llm operator+(const llm &y) const {
    return llm((long long int)*this + (long long int)y);
  }
  llm operator+=(const llm &y) {
    *this = *this + y;
    return *this;
  }
  llm operator-(const llm &y) const {
    return llm((long long int)*this - (long long int)y);
  }
  llm operator-=(const llm &y) {
    *this = *this - y;
    return *this;
  }
  llm operator-() const { return llm(0) - *this; }
  llm operator*(const llm &y) const {
    return llm((long long int)*this * (long long int)y);
  }
  llm operator*=(const llm &y) {
    *this = *this * y;
    return *this;
  }
  llm operator/(const llm &y) const { return *this * y.inv(); }
  llm operator/=(const llm &y) {
    *this = *this / y;
    return *this;
  }
  llm inv() const {
    long long int x, y;
    if (extgcd(n, 1000000007, x, y) == 1) return llm(x);
    return llm(0);
  }
  friend istream &operator>>(istream &os, llm &x);
  friend ostream &operator<<(ostream &os, const llm &x);
};
istream &operator>>(istream &is, llm &x) {
  long long int n;
  is >> n;
  x = llm(n);
  return is;
}
ostream &operator<<(ostream &os, const llm &x) {
  os << (long long int)x;
  return os;
}
template <typename T>
T comb(long long int n, long long int k) {
  T ret = 1;
  for (long long int i = 1; i <= k; i++) ret = ret * T(n - k + i) / T(i);
  return ret;
}
vector<pair<long long int, long long int>> segmentUnion(
    vector<pair<long long int, long long int>> segments) {
  vector<pair<long long int, long long int>> ret;
  if (segments.empty()) return ret;
  sort(segments.begin(), segments.end());
  long long int l = segments[0].first, r = segments[0].second;
  for (int i = 1; i < segments.size(); i++) {
    if (r <= segments[i].first) {
      ret.push_back(make_pair(l, r));
      l = segments[i].first;
      r = segments[i].second;
    } else {
      r = max(r, segments[i].second);
    }
  }
  ret.push_back(make_pair(l, r));
  return ret;
}
long long int M, N;
vector<long long int> l, r;
int main(void) {
  cin >> N >> M;
  for (int i = 0; i < N; i++) {
    l.push_back(nextLL());
    r.push_back(nextLL());
  }
  vector<long long int> delta(M + 10);
  for (int i = 0; i < N; i++) {
    vector<pair<long long int, long long int>> seg;
    long long int sq = sqrt(r[i]);
    for (int j = 1;; j++) {
      long long int nl = ceil((0.0 + l[i]) / j);
      long long int nr = r[i] / j;
      seg.push_back(make_pair(nl, nr + 1));
      if (nr < sq) break;
    }
    for (int j = 1; j <= sq; j++) {
      if (l[i] / j * j == l[i] || l[i] / j * j + j <= r[i]) {
        seg.push_back(make_pair(j, j + 1));
      }
    }
    seg = segmentUnion(seg);
    for (auto &s : seg) {
      delta[s.first]++;
      delta[s.second]--;
    }
  }
  long long int ans = 0;
  for (int i = 1; i <= M; i++) {
    ans += delta[i];
    cout << ans << endl;
  }
  return 0;
}
