#include <bits/stdc++.h>
using namespace std;
int main() {
  int sum = 0;
  int N, M;
  cin >> N >> M;
  int l[N], r[N];
  for (int i = 0; i < (int)(N); ++i) cin >> l[i] >> r[i];
  int D[M + 1];
  for (int d = 0; d < (int)(M); ++d) D[d + 1] = 0;
  for (int d = 0; d < (int)(M); ++d) {
    for (int i = 0; i < (int)(N); ++i) {
      if (r[i] - l[i] + 1 > (d + 1) - 1) {
        D[d + 1]++;
      } else if (l[i] % (d + 1) == 0 || r[i] % (d + 1) == 0) {
        D[d + 1]++;
      } else if (l[i] % (d + 1) > r[i] % (d + 1)) {
        D[d + 1]++;
      }
    }
    cout << D[d + 1] << endl;
  }
  return 0;
}
