#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[400000];
long long b[800000];
long long c[800000];
signed main() {
  cin >> n >> m;
  for (long long i = 0; i < n; i++) {
    cin >> a[i].x >> a[i].y;
    b[a[i].x]++;
    c[a[i].y]++;
  }
  for (long long i = 1; i <= 2 * m; i++) {
    b[i] += b[i - 1];
    c[i] += c[i - 1];
  }
  for (long long i = 1; i <= m; i++) {
    long long sum = n;
    for (long long j = i; j <= 2 * m; j += i) {
      sum -= max(0ll, c[j - 1] - b[j - i]);
    }
    cout << sum << endl;
  }
}
