#include <bits/stdc++.h>
using namespace std;
class Point {
 public:
  double x, y;
  Point(double x = 0, double y = 0) : x(x), y(y) {}
  Point operator+(Point p) { return Point(x + p.x, y + p.y); }
  Point operator-(Point p) { return Point(x - p.x, y - p.y); }
  Point operator*(double a) { return Point(x * a, y * a); }
  Point operator/(double a) { return Point(x / a, y / a); }
  double absv() { return sqrt(norm()); }
  double norm() { return x * x + y * y; }
  bool operator<(const Point &p) const { return x != p.x ? x < p.x : y < p.y; }
  bool operator==(const Point &p) const {
    return fabs(x - p.x) < (1e-10) && fabs(y - p.y) < (1e-10);
  }
};
struct Segment {
  Point p1, p2;
};
double hen(Point a) {
  if (fabs(a.x) < (1e-10) && a.y > 0)
    return acos(0);
  else if (fabs(a.x) < (1e-10) && a.y < 0)
    return 3 * acos(0);
  else if (fabs(a.y) < (1e-10) && a.x < 0)
    return 2 * acos(0);
  else if (fabs(a.y) < (1e-10) && a.x > 0)
    return 0.0;
  else if (a.y > 0)
    return acos(a.x / a.absv());
  else
    return 2 * acos(0) + acos(-a.x / a.absv());
}
string itos(long long i) {
  ostringstream s;
  s << i;
  return s.str();
}
long long gcd(long long v, long long b) {
  if (v > b) return gcd(b, v);
  if (v == b) return b;
  if (b % v == 0) return v;
  return gcd(v, b % v);
}
double dot(Point a, Point b) { return a.x * b.x + a.y * b.y; }
double cross(Point a, Point b) { return a.x * b.y - a.y * b.x; }
double distans(double x1, double y1, double x2, double y2) {
  double rr = (x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2);
  return sqrt(rr);
}
long long beki(long long a, long long r) {
  if (r == 0) return 1;
  if (r == 1) return a % 1000000007;
  if (r % 2 == 1) {
    long long y = beki(a, r - 1);
    return (y * a) % 1000000007;
  }
  long long yy = beki(a, r / 2);
  return (yy * yy) % 1000000007;
}
long long inf = 1000000007 * 2;
long long n, m;
long long l[300020] = {0};
long long r[300020] = {0};
long long ans[100020] = {0};
long long imo[100020] = {0};
void sd() {
  for (long long i = 1; i <= m; i++) printf("%d\n", ans[i]);
}
signed main() {
  cin >> n >> m;
  for (long long i = 1; i <= n; i++) scanf("%d %d", &l[i], &r[i]);
  long long rr = min(m, 333ll);
  for (long long i = 1; i <= rr; i++) {
    for (long long j = 1; j <= n; j++) {
      if (r[j] / i - (l[j] - 1) / i >= 1) ans[i]++;
    }
  }
  for (long long j = 1; j <= n; j++) {
    long long q = 10000000;
    for (long long i = 1; i <= 303; i++) {
      long long hi, mi;
      mi = r[j] / i;
      hi = l[j] / i;
      mi = min(mi, m);
      if ((l[j] % i) != 0) hi++;
      hi = max(334ll, hi);
      if (hi > mi) continue;
      if (hi == q) continue;
      if (mi >= q) {
        imo[hi] += 1;
        imo[q] -= 1;
        q = hi;
      } else {
        q = hi;
        imo[hi] += 1;
        imo[mi + 1] -= 1;
      }
      if (mi <= 334 && hi == 334) break;
    }
  }
  for (long long i = 1; i <= 100002; i++) {
    imo[i] += imo[i - 1];
  }
  for (long long i = 304; i <= max(m, 304ll); i++) ans[i] = imo[i];
  sd();
  return 0;
}
