#include <bits/stdc++.h>
using namespace std;
int main() {
  int N, M;
  vector<int> mins;
  vector<int> maxes;
  vector<int> difference;
  cin >> N >> M;
  for (int i = 0; i < N; i++) {
    int l, r;
    cin >> l >> r;
    mins.push_back(l);
    maxes.push_back(r);
    difference.push_back(r - l);
  }
  vector<int> result;
  for (int i = 0; i <= M; i++) {
    result.push_back(0);
  }
  for (int i = 1; i <= M; i++) {
    for (int j = 0; j < N; j++) {
      if (difference[j] >= i) {
        result[i]++;
      } else if (mins[j] % i == 0) {
        result[i]++;
      } else if (mins[j] / i != maxes[j] / i) {
        result[i]++;
      }
    }
    cout << result[i] << endl;
  }
  return 0;
}
