#include <bits/stdc++.h>
using namespace std;
const int inf = 1000000001;
const long long INF = 1e18 * 4;
int dx[4] = {1, 0, -1, 0}, dy[4] = {0, 1, 0, -1};
int dx2[8] = {1, 1, 0, -1, -1, -1, 0, 1}, dy2[8] = {0, 1, 1, 1, 0, -1, -1, -1};
const int DAT_SIZE = (1 << 18) - 1;
vector<long long> dat(DAT_SIZE), datb(DAT_SIZE);
void add(int a, int b, long long x, int v, int l, int r) {
  if (a <= l && r <= b) {
    dat[v] += x;
  } else if (l < b && a < r) {
    datb[v] += (min(b, r) - max(a, l)) * x;
    add(a, b, x, v * 2 + 1, l, (l + r) / 2);
    add(a, b, x, v * 2 + 2, (l + r) / 2, r);
  }
}
long long sum(int a, int b, int v, int l, int r) {
  if (r <= a || b <= l) {
    return 0;
  } else if (a <= l && r <= b) {
    return dat[v] * (r - l) + datb[v];
  } else {
    long long res = (min(b, r) - max(a, l)) * dat[v];
    res += sum(a, b, v * 2 + 1, l, (l + r) / 2);
    res += sum(a, b, v * 2 + 2, (l + r) / 2, r);
    return res;
  }
}
int main() {
  int n, m, i, j;
  cin >> m >> m;
  vector<int> l(n), r(n);
  vector<vector<int> > d(m + 3, vector<int>());
  for (i = 0; i < n; i++) {
    cin >> l[i] >> r[i];
    d[r[i] - l[i] + 2].push_back(i);
  }
  int safe = n;
  for (int k = 1; k <= m; k++) {
    int res = 0;
    safe -= d[k].size();
    res += safe;
    for (i = 0; i < d[k].size(); i++) {
      add(l[d[k][i]], r[d[k][i]] + 1, 1, 0, 0, m + 1);
    }
    for (i = 1; k * i <= m; i++) {
      res = res + sum(k * i, k * i + 1, 0, 0, m + 1);
    }
    printf("%d\n", res);
  }
}
