#include <bits/stdc++.h>
template <typename T>
bool chmax(T &a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
template <typename T>
bool chmin(T &a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
using namespace std;
using ll = long long int;
const int MOD = 1000000007;
const int INTMAX = 2147483647;
const ll LLMAX = 9223372036854775807;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  ll N, M;
  cin >> N >> M;
  vector<ll> l(N), r(N);
  for (ll i = 0; i < N; i++) cin >> l[i] >> r[i];
  vector<ll> count(M + 1, 0);
  for (ll i = 0; i < N; i++) {
    for (ll j = 1; j <= M; j++) {
      if (l[i] % j == 0 || r[i] % j == 0)
        count[j]++;
      else if (l[i] / j != r[i] / j)
        count[j]++;
    }
  }
  for (ll j = 1; j <= M; j++) {
    cout << count[j] << endl;
  }
  return 0;
}
