#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  int N, M;
  cin >> N >> M;
  vector<int> imos(M + 5, 0);
  for (int i = (0); i < (int)(N); i++) {
    int l, r;
    cin >> l >> r;
    int d = 1;
    int mn = M + 5;
    while (mn > 1) {
      while ((l + d - 1) / d > mn) d++;
      int a = (l + d - 1) / d;
      int b = r / d;
      if (mn < b) b = mn;
      if (a <= mn && a <= b) {
        imos[a]++;
        imos[b + 1]--;
        mn = min(mn, a - 1);
      }
      d++;
    }
  }
  vector<int> ret(M + 5, 0);
  int now = 0;
  for (int i = (0); i < (int)(M + 5); i++) {
    now += imos[i];
    ret[i] = now;
  }
  for (int i = (1); i < (int)(M + 1); i++) {
    if (i == 1)
      cout << N << endl;
    else
      cout << ret[i] << endl;
  }
  return 0;
}
