#include <bits/stdc++.h>
using namespace std;
const long long MOD_CONST = 1000000007ll;
long long modSum(long long a, long long b, long long MOD = MOD_CONST) {
  return ((a % MOD) + (b % MOD)) % MOD;
}
long long modSubtract(long long a, long long b, long long MOD = MOD_CONST) {
  return (((a % MOD) - (b % MOD)) + MOD + MOD) % MOD;
}
long long modProd(long long a, long long b, long long MOD = MOD_CONST) {
  return ((a % MOD) * (b % MOD)) % MOD;
}
long long getPowMod(long long x, long long e, long long MOD = MOD_CONST) {
  if (e == 0) return 1;
  if (e % 2 == 0) {
    long long tmp = getPowMod(x, e / 2, MOD);
    return modProd(tmp, tmp);
  } else {
    long long tmp = getPowMod(x, e - 1, MOD);
    return modProd(tmp, x);
  }
}
long long getPow(long long x, long long e) {
  if (e == 0) return 1;
  if (e % 2 == 0) {
    long long tmp = getPow(x, e / 2);
    return tmp * tmp;
  } else {
    long long tmp = getPow(x, e - 1);
    return tmp * x;
  }
}
long long getInverse(long long x, long long MOD = MOD_CONST) {
  return getPowMod(x, MOD - 2, MOD);
}
bool isEven(long long x) {
  long long tmp = ((x % 2) + 2) % 2;
  return tmp == 0;
}
long long getSumOfDigitsInBase(long long n, long long b) {
  long long ret = 0;
  while (n > 0) {
    ret += n % b;
    n /= b;
  }
  return ret;
}
vector<int> getKMP(string &s) {
  int len = (int)s.size();
  vector<int> ret(len, 0);
  for (int i = 1; i < len; i++) {
    int at = ret[i - 1];
    while (at > 0 && s[i] != s[at]) {
      at = ret[at - 1];
    }
    if (s[i] == s[at]) {
      at++;
    }
    ret[i] = at;
  }
  return ret;
}
string getSubstring(string &s, int from, int to) {
  int l = to - from + 1;
  if (l <= 0) {
    return "";
  }
  return s.substr(from, l);
}
long long gcd(long long a, long long b, long long &x, long long &y) {
  if (a == 0) {
    x = 0;
    y = 1;
    return b;
  }
  long long x1, y1;
  long long d = gcd(b % a, a, x1, y1);
  x = y1 - (b / a) * x1;
  y = x1;
  return d;
}
pair<long long, long long> getIntersectingRange(long long a1, long long b1,
                                                long long a2, long long b2) {
  long long s = max(a1, a2);
  long long e = min(b1, b2);
  return {s, e};
}
bool isNonEmptyIntersection(long long a1, long long b1, long long a2,
                            long long b2) {
  auto p = getIntersectingRange(a1, b1, a2, b2);
  return p.first <= p.second;
}
double getPointDistance(double x1, double y1, double x2, double y2) {
  double dx = x1 - x2;
  double dy = y1 - y2;
  double d = (dx * dx) + (dy * dy);
  return sqrt(d);
}
bool isPrime(long long x) {
  if (x == 2 || x == 3 || x == 5 || x == 7) return true;
  if (x < 10) return false;
  long long till = min((long long)sqrt(x) + 1, x - 1);
  for (long long i = 2; i <= till; i++) {
    if (x % i == 0) {
      return false;
    }
  }
  return true;
}
const int MAXN = 300002;
const int MAXM = 100002;
int N, M;
long long segTree[4 * MAXM], lazy[4 * MAXM];
pair<int, pair<int, int> > ranges[MAXN];
void propogate(int at, int from, int to) {
  if (lazy[at] != 0) {
    segTree[at] += (to - from + 1) * lazy[at];
    lazy[2 * at] += lazy[at];
    lazy[2 * at + 1] += lazy[at];
    lazy[at] = 0;
  }
}
void update(int at, int from, int to, int ul, int ur, int v) {
  if (to < from) return;
  propogate(at, from, to);
  if (ul <= from && ur >= to) {
    lazy[at] += v;
    propogate(at, from, to);
    return;
  }
  if (ul > to || ur < from) {
    return;
  }
  int mid = (from + to) / 2;
  update(2 * at, from, mid, ul, ur, v);
  update(2 * at + 1, mid + 1, to, ul, ur, v);
  segTree[at] = segTree[2 * at] + segTree[2 * at + 1];
}
int query_pointwise(int at, int from, int to, int q) {
  propogate(at, from, to);
  if (from == to) {
    return segTree[at];
  }
  int mid = (from + to) / 2;
  if (q <= mid) {
    return query_pointwise(2 * at, from, mid, q);
  } else {
    return query_pointwise(2 * at + 1, mid + 1, to, q);
  }
}
void input() {
  cin >> N >> M;
  for (int i = 1; i <= N; i++) {
    cin >> ranges[i].second.first >> ranges[i].second.second;
    ranges[i].first = ranges[i].second.second - ranges[i].second.first + 1;
  }
}
void preprocess() {}
void solve() {
  sort(ranges + 1, ranges + N + 1);
  int p = 1;
  for (int i = 1; i <= M; i++) {
    while (p <= N && ranges[p].first < i) {
      update(1, 1, M, ranges[p].second.first, ranges[p].second.second, 1);
      p++;
    }
    int ans = N - p + 1;
    for (int j = i; j <= M; j += i) {
      ans += query_pointwise(1, 1, M, j);
    }
    cout << ans << "\n";
  }
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cerr.tie(0);
  int T;
  T = 1;
  for (int i = 0; i < T; i++) {
    input();
    preprocess();
    solve();
  }
  return 0;
}
