#include <bits/stdc++.h>
int kind, station;
const int MAX_N = 100000;
int n;
int BIT[100000 + 1];
void init(int n_param) {
  n = 1;
  while (n < n_param) {
    n <<= 1;
  }
}
void add(int index, int value) {
  ++index;
  while (index <= n) {
    BIT[index] += value;
    index += (index & -index);
  }
}
int sum(int index) {
  int value = 0;
  ++index;
  while (index > 0) {
    value += BIT[index];
    index -= (index & -index);
  }
  return value;
}
int kind_in[1000000];
std::vector<int> kind_out[1000000];
std::vector<int> tr_on[1000000];
int count[1000000];
int main() {
  using std::endl;
  std::cin.sync_with_stdio(false);
  std::cout.sync_with_stdio(false);
  std::cin >> kind >> station;
  init(station);
  for (int i = 0; i < kind; ++i) {
    int l, r;
    std::cin >> l >> r;
    ++kind_in[l];
    kind_out[r].push_back(l);
  }
  for (int i = 1; i <= station; ++i) {
    for (int p = i; p <= station; p += i) {
      tr_on[p].push_back(i);
    }
  }
  for (int i = 1; i <= station; ++i) {
    add(i, kind_in[i]);
    for (auto p : tr_on[i]) {
      count[p] += sum(i) - sum(std::max(-1, i - p));
    }
    for (auto p : kind_out[i]) {
      add(p, -1);
    }
  }
  for (int p = 1; p <= station; ++p) {
    std::cout << count[p] << std::endl;
  }
  return 0;
}
