#include <bits/stdc++.h>
using namespace std;
const int MAXN = 3e5 + 10, MAXM = 1e5 + 10;
int N, M, posL[MAXM], posR[MAXM], lastL[MAXN];
bool debug = 0;
vector<pair<int, int> > query;
int main(int argc, char *argv[]) {
  if (argc > 1) debug = argv[1][0] - '0';
  scanf("%d%d", &N, &M);
  for (int i = 0; i < N; i++) {
    int l, r;
    scanf("%d%d", &l, &r);
    query.push_back({l, r});
    posL[l]++;
    posR[r]++;
  }
  for (int i = 1; i < M + 1; i++) {
    if (posL[i]) {
      lastL[i] = i;
    } else {
      lastL[i] = lastL[i - 1];
    }
    posL[i] += posL[i - 1];
    posR[i] += posR[i - 1];
  }
  for (int k = 1; k < M + 1; k++) {
    if (debug) printf("k: %d\n", k);
    int ans = 0;
    for (int i = k; i <= M; i += k) {
      ans += posL[i] - posR[i - 1];
      if (debug) printf("\tans: %d\n", ans);
    }
    for (int i = 0; i < N; i++) {
      pair<int, int> q = query[i];
      int stops = (q.second / k) - ((q.first - 1) / k);
      if (stops > 1) {
        ans -= stops - 1;
      }
    }
    printf("%d\n", ans);
  }
}
