#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const ll MOD = 1000000007;
int ans[100000];
int main() {
  int N, M;
  scanf("%d%d", &N, &M);
  memset(ans, 0, sizeof(ans));
  for (int i = 0; i < N; i++) {
    int l, r;
    scanf("%d%d", &l, &r);
    ans[0]++;
    ans[r - l + 1]--;
    for (int d = r - l + 2; d <= r; d++) {
      if (d * ((l + d - 1) / d) <= r) {
        ans[d - 1]++;
        ans[d]--;
      }
    }
  }
  for (int i = 0; i < M; i++) {
    if (i > 0) ans[i] += ans[i - 1];
    printf("%d\n", ans[i]);
  }
  return 0;
}
