#include <bits/stdc++.h>
using namespace std;
const int M = 100005;
int cnt[M] = {};
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  int n, m;
  scanf("%d%d", &n, &m);
  int l, r;
  for (int i = 0; i < (int)n; ++i) {
    scanf("%d%d", &l, &r);
    int la;
    for (int j = 1; j <= r; j = la + 1) {
      la = min(r / (r / j), j >= l ? 1000000007 : (l - 1) / ((l - 1) / j));
      if (r / j - (l - 1) / j) {
        ++cnt[j];
        --cnt[la + 1];
      }
    }
  }
  for (int i = 1; i <= (int)m; ++i) printf("%d\n", cnt[i] += cnt[i - 1]);
}
