#include <bits/stdc++.h>
#define FOR(i,a,b) for (int i=(a);i<(b);i++)
#define FORR(i,a,b) for (int i=(a);i>=(b);i--)
#define pb push_back
#define pcnt __builtin_popcount
#define show(x) cout<<#x<<" = "<<x<<endl;
#define maxs(x,y) x = max(x,y)
#define mins(x,y) x = min(x,y)
#define fi first
#define se second
#define rng(a) (a.begin()),(a.end())
#define each(it,c) for(__typeof((c).begin()) it=(c).begin();it!=(c).end();it++)
#define sz(x) (int)(x).size()
#define mp make_pair

using namespace std;
typedef long long ll;
typedef pair<int,int> pii;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<pii> vpii;
typedef set<int> si;
typedef pair<ll,ll> pll;
typedef vector<ll> vl;
typedef vector<vl> vvl;
typedef vector<pll> vpll;
typedef set<ll> sl;
typedef __int128_t lll;
typedef pair<lll,lll> plll;
typedef vector<lll> vlll;
template<typename T>string join(vector<T>&v)
{stringstream s;FOR(i,0,sz(v))s<<' '<<v[i];return s.str().substr(1);}
template<typename A, size_t N, typename T>void Fill(A (&array)[N], const T&v)
{fill((T*)array,(T*)(array+N),v);}
ll gcd(ll a,ll b){if(a>b)swap(a,b);for(;a>0;b%=a,swap(a,b));return b;}
int modpow(ll a,ll n,int m){if(a==0)return a;ll p=1;for(;n>0;n/=2,a=a*a%m)if(n&1)p=p*a%m;return(int)p;}
void dout(double d){printf("%.12f\n",d);}

const int iinf = 1e9;
const ll linf = 1e18;
const int mod = 1e9+7;
const double pi = acos(-1);
const double eps = 1e-10;

struct StarrySky{
  typedef ll T; typedef ll T2;
  const T e_merge = 0;
  const T2 e_add = 0;
  T merge(T a, T b){
    return a+b;
  }
  T addT(T a, int l, T2 b){
    return a+b*l;
  }
  T2 addT2(T2 a, T2 b){
    return a+b;
  }
//###################################################
  int n;
  vector<T> d;
  vector<T2> s;
  void init(int m){
    n = 1<<(32-__builtin_clz(m-1));
    d.resize(2*n-1);
    s.resize(2*n-1);
    fill(d.begin(), d.end(), e_merge);
    fill(s.begin(), s.end(), e_add);
  }
  void init(vector<T>&v){
    init(v.size());
    for(int j=0; j<v.size(); j++) d[j+n-1] = v[j];
    for(int j=n-2; j>=0; j--) d[j] = merge(d[j*2+1], d[j*2+2]);
  }
  void ref(int k, int l){
    if(s[k] != e_add){
      s[k*2+1] = addT2(s[k*2+1], s[k]);
      d[k*2+1] = addT(d[k*2+1], l/2, s[k]);
      s[k*2+2] = addT2(s[k*2+2], s[k]);
      d[k*2+2] = addT(d[k*2+2], l/2, s[k]);
      s[k] = e_add;
    }
  }
  T _section_add(int a,int b,int k,int l,int r, T2&v){
    if(r<=a||b<=l){
    }else if(a<=l&&r<=b){
      s[k] = addT2(s[k], v);
      d[k] = addT(d[k], r-l, v);
    }else{
      ref(k, r-l);
      d[k] = merge(_section_add(a, b, k*2+1, l, (l+r)/2, v), _section_add(a, b, k*2+2, (l+r)/2, r, v));
    }
    return d[k];
  }
  void section_add(int a, int b, T2 v){
    _section_add(a, b, 0, 0, n, v);
  }
  T _query(int a,int b,int k,int l,int r){
    if(r<=a||b<=l) return e_merge;
    if(a<=l&&r<=b) return d[k];
    ref(k, r-l);
    return merge(_query(a, b, k*2+1, l, (l+r)/2), _query(a, b, k*2+2, (l+r)/2, r));
  }
  T query(int a,int b){
    return _query(a, b, 0, 0, n);
  }
};
int n, m;
vector<map<int, int> > v;
StarrySky ss;
main(){
  cin.tie(0);
  ios::sync_with_stdio(false);
  cin >> n >> m;
  v.resize(m+1);
  ss.init(m+1);
  FOR(i, 0, n){
    int l, r;
    cin >> l >> r;
    v[r-l+1][l]++;
  }
  vi ans(n+1, 0);
  ll s = n;
  FOR(i, 1, m+1){
    ll a = 0;
    for(int j = i; j <= m; j+=i)a += ss.query(j, j+1);
    cout << a+s << "\n";
    each(itr, v[i]){
      ss.section_add(itr->fi, itr->fi+i, itr->se);
      s -= itr->se;
    }
  }
  return 0;
}

Measured memory_bytes: 22912