#include <bits/stdc++.h>
using namespace std;
array<long long, 100000> ri;
array<long long, 100000> li;
array<long long, 100000> res;
int main() {
  long long n, m;
  cin >> n >> m;
  for (long long i = 0; i < n; i++) {
    cin >> li[i] >> ri[i];
    if (ri[i] - li[i] + 1 > m) {
      for (long long j = 0; j < n; j++) res[j]++;
    } else {
      for (long long j = 0; j < m; j++) {
        if (ri[i] - li[i] + 1 > j)
          res[j]++;
        else {
          if ((li[i] % (j + 1) == 0) || (ri[i] % (j + 1) == 0))
            res[j]++;
          else if ((li[i] / (j + 1) < ri[i] / (j + 1)))
            res[j]++;
        }
      }
    }
  }
  for (long long i = 0; i < m; i++) {
    cout << res[i] << endl;
  }
}
