#include <algorithm>
#include <array>
#include <bitset>
#include <cassert>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstring>
#include <deque>
#include <functional>
#include <iomanip>
#include <locale>
#include <iostream>
#include <map>
#include <memory>
#include <new>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <sstream>
#include <string>
#include <tuple>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>

#define REP(i,n) for(int i=0;i<(int)(n);i++)
#define ALL(x) (x).begin(),(x).end()

using namespace std;

using ll = long long;
using ld = long double;

template <typename T> T &chmin(T &a, const T &b) { return a = min(a, b); }
template <typename T> T &chmax(T &a, const T &b) { return a = max(a, b); }
template <typename T> int len(const T &x) { return x.size(); }

template<typename T>
vector<T> table(int n, T v) { return vector<T>(n, v); }

template <class... Args>
auto table(int n, Args... args) {
  auto val = table(args...);
  return vector<decltype(val)>(n, move(val));
}

struct yes_no : numpunct<char> {
  string_type do_truename()  const { return "Yes"; }
  string_type do_falsename() const { return "No"; }
};

vector<pair<int,int>> uniq(vector<pair<int,int>> v) {
  sort(ALL(v));
  vector<pair<int,int>> res;
  for (auto p: v) {
    if (res.empty() || res.back().second < p.first) res.push_back(p);
    else res.back().second = max(res.back().second, p.second);
  }
  return res;
}

int dp[128000];

const int NUM = 350;

void solve(ll N, ll M, vector<ll> l, vector<ll> r) {
  REP(i,N) {
    for (int j = 1; j <= NUM; ++j) {
      int prev = NUM + 1;
      if ((l[i] - 1) / j < r[i] / j) {
        ++dp[j]; --dp[j+1];
        int left = (l[i] + j - 1) / j;
        int right = r[i] / j + 1;
        chmax(left, prev);
        chmax(right, left);
        prev = right;
        ++dp[left]; --dp[right];
        // cout << left << " " << right << endl;
      }
    }
  }
  REP(i,120000) dp[i+1] += dp[i];
  for (int i = 0; i < M; ++i) {
    cout << dp[i+1] << endl;
  }
}

int main() {
  locale loc(locale(), new yes_no);
  cout << boolalpha << setprecision(12) << fixed;
  cout.imbue(loc);
	ll N;
	ll M;
	scanf("%lld", &N);
	vector<ll> r(N-1+1);
	vector<ll> l(N-1+1);
	scanf("%lld", &M);
	for (int i = 0 ; i <= N-1 ; i++) {
	  scanf("%lld", &l[i]);
	  scanf("%lld", &r[i]);
	}
	solve(N, M, l, r);
	return 0;
}
