#include <bits/stdc++.h>
using namespace std;
vector<int> v1[1000001];
vector<int> v[100001];
void build(int node, int L, int R) {
  for (int i = L; i <= R; i++) {
    for (int j = 0; j < v[i].size(); j++) {
      v1[node].push_back(v[i][j]);
    }
  }
  sort(v1[node].begin(), v1[node].end());
  if (L >= R) return;
  build(2 * node, L, (L + R) / 2);
  build(2 * node + 1, (L + R) / 2 + 1, R);
}
int query(int node, int L, int R, int l, int r) {
  if (L > R || L > r || R < l) return 0;
  int ans = 0;
  if (L >= l && R <= r) {
    int idx =
        upper_bound(v1[node].begin(), v1[node].end(), r - 1) - v1[node].begin();
    ans += v1[node].size() - idx;
    return ans;
  }
  int a = query(node * 2, L, (L + R) / 2, l, r);
  int b = query(node * 2, (L + R) / 2 + 1, R, l, r);
  return (a + b);
}
int main() {
  int n, m;
  cin >> n >> m;
  for (int i = 0; i < n; i++) {
    int l, r;
    cin >> l >> r;
    v[l].push_back(r);
  }
  build(1, 1, m);
  for (int d = 1; d <= m; d++) {
    int ans = 0;
    for (int i = d; i <= m; i += d) {
      ans += query(1, 1, m, i - d + 1, i);
    }
    cout << ans << "\n";
  }
  return 0;
}
