#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ii = pair<ll, ll>;
const int MAX{400010};
ll ps[MAX], pc = 0;
bitset<MAX> sieve;
void precomp() {
  sieve.set();
  ps[pc++] = 2;
  ps[pc++] = 3;
  for (ll k = 4; k < MAX; k += 2) sieve[k] = true;
  for (ll k = 9; k < MAX; k += 3) sieve[k] = true;
  for (ll k = 5, step = 2; k < MAX; k += step, step ^= 6) {
    if (sieve[k]) {
      ps[pc++] = k;
      for (ll r = k; r < MAX; r += k) sieve[r] = false;
    }
  }
}
int amount[MAX];
int main() {
  ios::sync_with_stdio(false);
  precomp();
  int N, M;
  cin >> N >> M;
  for (int k = 0; k < N; ++k) {
    int L, R;
    cin >> L >> R;
    amount[1] += 1;
    amount[R + 1] -= 1;
    auto y = L - 1;
    auto x = R / 2 + 1;
    if (x <= y) {
      amount[x] -= 1;
      amount[y + 1] += 1;
    }
  }
  auto last = 0;
  for (int k = 0; k < MAX; ++k) {
    amount[k] += last;
    last = amount[k];
  }
  for (int k = 1; k <= M; ++k) cout << amount[k] << endl;
  return 0;
}
