#include <bits/stdc++.h>
using namespace std;
const long long Mod = 1000000007;
struct P {
  long long pos, cost;
  bool operator<(const P &b) { return cost < b.cost; }
  bool operator>(const P &b) { return cost > b.cost; }
};
struct B {
  long long to, cost;
};
struct E {
  long long from, to, cost;
  bool operator<(const E &b) { return cost < b.cost; }
  bool operator>(const E &b) { return cost > b.cost; }
};
struct H {
  long long x, y;
  bool operator<(const H &b) {
    if (x != b.x) return x < b.x;
    return y < b.y;
  }
  bool operator>(const H &b) {
    if (x != b.x) return x > b.x;
    return y > b.y;
  }
  bool operator==(const H &b) { return x == b.x && y == b.y; }
  bool operator!=(const H &b) { return (*this) != b; }
};
long long gcd(long long i, long long j) {
  if (i > j) swap(i, j);
  if (i == 0) return j;
  return gcd(j % i, i);
}
long double mod_pow(long long x, long long n, long long p) {
  long long res = 1;
  while (n > 0) {
    if (n & 1) res = res * x % p;
    x = x * x % p;
    n >>= 1;
  }
  return res;
}
const long long Inf = 3023372036854775807;
const int inf = 1500000000;
long long n, m;
H a[200000];
long long b[200000];
long long c[200000];
signed main() {
  cin >> n >> m;
  for (long long i = 0; i < n; i++) {
    cin >> a[i].x >> a[i].y;
    c[a[i].x]++;
    c[a[i].y + 1]--;
    long long k = 1;
    while (k <= a[i].y - a[i].x + 1) {
      long long r = a[i].y / k - (a[i].x - 1) / k;
      long long s = 1, e = a[i].y - a[i].x + 2, t;
      while (e - s > 1) {
        t = (s + e) / 2;
        if (a[i].y / t - (a[i].x - 1) / t >= r)
          s = t;
        else
          e = t;
      }
      b[k] -= r - 1;
      b[s + 1] += r - 1;
      k = s + 1;
    }
  }
  for (long long i = 1; i <= m; i++) {
    c[i] += c[i - 1];
  }
  for (long long i = 1; i <= m; i++) {
    long long sum = 0;
    for (long long j = 0; j <= m; j += i) {
      sum += c[j];
    }
    b[i] += b[i - 1];
    cout << sum + b[i] << endl;
  }
}
