#include <bits/stdc++.h>
using namespace std;
const double EPS = 1e-8;
const int mod = 1e9 + 7;
const int N = 1e6 + 10;
const long long INF = 1e18;
long long power(long long x, long long y) {
  long long t = 1;
  while (y > 0) {
    if (y % 2)
      y -= 1, t = t * x % mod;
    else
      y /= 2, x = x * x % mod;
  }
  return t;
}
pair<int, int> iv[N];
int MX = 800;
int pl[N];
int ans[N];
int tp[N], tp1[N];
int main() {
  int n, m;
  scanf("%d%d", &m, &n);
  for (int i = 0; i < m; ++i) {
    scanf("%d%d", &iv[i].first, &iv[i].second);
  }
  for (int i = 1; i < MX; ++i) {
    for (int j = 0; j < m; ++j)
      if (iv[j].second / i != (iv[j].first - 1) / i) ans[i]++;
  }
  for (int i = 0; i < m; ++i) {
    int ml = (iv[i].first - 1) / MX;
    tp[0] = tp1[0] = n + 1;
    for (int j = 1; j < ml + 2; ++j) {
      tp[j] = (iv[i].first - 1) / j;
      tp1[j] = (iv[i].second) / j;
    }
    for (int j = 0; j < ml + 1; ++j) {
      pair<int, int> z =
          make_pair(max(tp[j + 1], tp1[j + 1]) + 1, min(tp[j], tp1[j]));
      if (z.first <= z.second) {
        pl[z.first]++;
        pl[z.second + 1]--;
      }
    }
  }
  int x = 0;
  for (int i = 0; i < n + 1; ++i) {
    x += pl[i];
    if (i >= MX) {
      ans[i] = m - x;
    }
  }
  for (int i = 1; i < n + 1; ++i) printf("%d\n", ans[i]);
  return 0;
}
