#include <bits/stdc++.h>
#define LLI long long int
#define FOR(v, a, b) for(LLI v = (a); v < (b); ++v)
#define FORE(v, a, b) for(LLI v = (a); v <= (b); ++v)
#define REP(v, n) FOR(v, 0, n)
#define REPE(v, n) FORE(v, 0, n)
#define REV(v, a, b) for(LLI v = (a); v >= (b); --v)
#define ALL(x) (x).begin(), (x).end()
#define RALL(x) (x).rbegin(), (x).rend()
#define ITR(it, c) for(auto it = (c).begin(); it != (c).end(); ++it)
#define RITR(it, c) for(auto it = (c).rbegin(); it != (c).rend(); ++it)
#define EXIST(c,x) ((c).find(x) != (c).end())
#define fst first
#define snd second
#define popcount __builtin_popcount
#define UNIQ(v) (v).erase(unique(ALL(v)), (v).end())
#define bit(i) (1LL<<(i))

#ifdef DEBUG
#include <misc/C++/Debug.cpp>
#else
#define dump(...) ((void)0)
#endif

#define gcd __gcd

using namespace std;
template <class T> constexpr T lcm(T m, T n){return m/gcd(m,n)*n;}

template <typename I> void join(ostream &ost, I s, I t, string d=" "){for(auto i=s; i!=t; ++i){if(i!=s)ost<<d; ost<<*i;}ost<<endl;}
template <typename T> istream& operator>>(istream &is, vector<T> &v){for(auto &a : v) is >> a; return is;}

template <typename T, typename U> bool chmin(T &a, const U &b){return (a>b ? a=b, true : false);}
template <typename T, typename U> bool chmax(T &a, const U &b){return (a<b ? a=b, true : false);}
template <typename T, size_t N, typename U> void fill_array(T (&a)[N], const U &v){fill((U*)a, (U*)(a+N), v);}

template <typename T> class LazySegmentTree{
private:
  int size;
  vector<T> vec;
  T e;
  function<T(T,T)> f, upd;
  
  inline void propagate(int i){
    if(i<size/2){
      vec[i*2+1] = f(vec[i], vec[i*2+1]);
      vec[i*2+2] = f(vec[i], vec[i*2+2]);
      vec[i] = e;
    }
  }
  
  inline void update_aux(int s, int t, int i, int l, int r, const T &x){
    if(r <= s || t <= l) return;
    else if(s <= l && r <= t) vec[i] = upd(vec[i],x);
    else{
      propagate(i);
      update_aux(s,t,i*2+1,l,(l+r)/2,x);
      update_aux(s,t,i*2+2,(l+r)/2,r,x);
    }
  }
  
  inline void get_aux(int i){if(i>0) get_aux((i-1)/2); propagate(i);}
  
public:
  LazySegmentTree(int n, const T &e, const function<T(T,T)> &f, const function<T(T,T)> &upd): e(e), f(f), upd(upd){
    size = 1;
    while(size < n) size *= 2;
    size = size*2-1;
    vec = vector<T>(size, e);
  }

  inline void update(int s, int t, const T &x){
    update_aux(s,t,0,0,size/2+1,x);
  }

  inline T get(int i){
    int j=i+size/2;
    get_aux((j-1)/2);
    return vec[j];
  }
};



int main(){
  cin.tie(0);
  ios::sync_with_stdio(false);

  int n,m;
  while(cin >> n >> m){
    vector<int> ans(m+1);

    vector<pair<int,int>> goods(n);
    REP(i,n){
      int l,r; cin >> l >> r;
      goods[i] = make_pair(l,r);
    }

    sort(RALL(goods), [](const pair<int,int> &a, const pair<int,int> &b){return a.snd-a.fst < b.snd-b.fst;});

    LazySegmentTree<int> seg(m+1, 0, [](int a, int b){return a+b;}, [](int a, int b){return a+b;});

    FORE(d,1,m){
      while(goods.size()){
        auto p = goods.back();
        if(p.snd-p.fst+1 > d) break;

        goods.pop_back();
        seg.update(p.fst, p.snd+1, 1);
      }

      ans[d] += goods.size();

      for(int i = d; i <= m; i += d){
        ans[d] += seg.get(i);
      }
    }


    FORE(i,1,m){
      cout << ans[i] << endl;
    }

    cerr << endl;
  }
  
  return 0;
}


Measured memory_bytes: 4736