#include <bits/stdc++.h>
int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, 1, 0, -1};
using namespace std;
struct BIT {
  int N;
  int data[100010];
  void init(int n) { N = n; }
  void add(int a, int w) {
    for (int x = a; x <= N; x += x & -x) data[x] += w;
  }
  int sum(int a) {
    int ret = 0;
    for (int x = a; x > 0; x -= x & -x) ret += data[x];
    return ret;
  }
};
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int n, m;
  cin >> n >> m;
  vector<vector<int> > souvenir(m + 1, vector<int>());
  for (int i = 0; i < (n); i++) {
    int l, r;
    cin >> l >> r;
    souvenir[r - l + 1].push_back(l);
  }
  BIT bittree;
  bittree.init(m + 1);
  int absolutepass = n;
  for (int d = 1; d <= m; d++) {
    for (auto a : souvenir[d - 1]) {
      bittree.add(a, 1);
      bittree.add(a + d - 1, -1);
      absolutepass--;
    }
    int ans = absolutepass;
    for (int dd = d; dd <= m; dd += d) {
      ans += bittree.sum(dd);
    }
    cout << ans << endl;
  }
  return 0;
}
