#include <bits/stdc++.h>
using namespace std;
long long n, m;
vector<long long> p;
vector<pair<long long, long long> > v;
long long can[100002];
long long l[300002];
long long r[300002];
signed main() {
  cin >> n >> m;
  for (long long i = 1; i <= n; i++) {
    cin >> l[i] >> r[i];
  }
  for (long long d = 1; d <= m; d++) {
    long long c = 0;
    for (long long i = 1; i <= n; i++) {
      if (r[i] - l[i] + 1 >= d || l[i] % d > r[i] % d || l[i] % d == 0) {
        c++;
      }
    }
    cout << c << endl;
  }
  return 0;
}
