#include <bits/stdc++.h>
using namespace std;
pair<int, int> arr[100009];
int n, m;
bool cmp(pair<int, int> a, pair<int, int> b) {
  return a.second - a.first < b.second - b.first;
}
int sgt[400009];
void UPD(int node, int l, int r, int k, int val) {
  if (l == r) {
    sgt[node] += val;
    return;
  }
  if ((l + r) / 2 >= k)
    UPD(node * 2, l, (l + r) / 2, k, val);
  else
    UPD(node * 2 + 1, (l + r) / 2 + 1, r, k, val);
  sgt[node] = sgt[node * 2] + sgt[node * 2 + 1];
}
int query(int node, int l, int r, int s, int e) {
  if (l >= s && r <= e) return sgt[node];
  if ((l + r) / 2 >= s && (l + r) / 2 + 1 <= e)
    return query(node * 2, l, (l + r) / 2, s, e) +
           query(node * 2 + 1, (l + r) / 2 + 1, r, s, e);
  if ((l + r) / 2 >= s) return query(node * 2, l, (l + r) / 2, s, e);
  return query(node * 2 + 1, (l + r) / 2 + 1, r, s, e);
}
int ans[100009];
int main() {
  cin >> n >> m;
  for (int i = 0; i < n; i++) {
    cin >> arr[i].first >> arr[i].second;
    arr[i].first--;
    arr[i].second--;
    UPD(1, 0, m, arr[i].first, 1);
    UPD(1, 0, m, arr[i].second + 1, -1);
  }
  sort(arr, arr + n, cmp);
  int num = 0;
  for (int i = m; i >= 1; i--) {
    while (n > 0 && i <= arr[n - 1].second - arr[n - 1].first + 1) {
      UPD(1, 0, m, arr[n - 1].first, -1);
      UPD(1, 0, m, arr[n - 1].second + 1, 1);
      n--;
      num++;
    }
    ans[i] += num;
    for (int j = i; j <= m; j += i) {
      ans[i] += query(1, 0, m, 0, j - 1);
    }
  }
  for (int i = 1; i <= m; i++) {
    cout << ans[i] << endl;
  }
}
