#include <bits/stdc++.h>
using namespace std;
template <class T>
T inf() {
  return numeric_limits<T>::has_infinity ? numeric_limits<T>::infinity()
                                         : (numeric_limits<T>::max() / 2);
}
FILE *file_in = stdin, *file_out = stdout;
struct NORMAL_IN {
  bool cnt;
  NORMAL_IN() : cnt(true) {}
  operator int() const { return cnt; }
  NORMAL_IN &operator>>(int &n) {
    cnt = fscanf(file_in, "%d", &n) != EOF;
    return *this;
  }
  NORMAL_IN &operator>>(unsigned int &n) {
    cnt = fscanf(file_in, "%u", &n) != EOF;
    return *this;
  }
  NORMAL_IN &operator>>(long long &n) {
    cnt = fscanf(file_in, "%lld", &n) != EOF;
    return *this;
  }
  NORMAL_IN &operator>>(unsigned long long &n) {
    cnt = fscanf(file_in, "%llu", &n) != EOF;
    return *this;
  }
  NORMAL_IN &operator>>(double &n) {
    cnt = fscanf(file_in, "%lf", &n) != EOF;
    return *this;
  }
  NORMAL_IN &operator>>(long double &n) {
    cnt = fscanf(file_in, "%Lf", &n) != EOF;
    return *this;
  }
  NORMAL_IN &operator>>(char *c) {
    cnt = fscanf(file_in, "%s", c) != EOF;
    return *this;
  }
  NORMAL_IN &operator>>(string &s) {
    s.clear();
    for (bool r = false;;) {
      const char c = getchar();
      if (c == EOF) {
        cnt = false;
        break;
      }
      const int t = isspace(c);
      if (!r and !t) r = true;
      if (r) {
        if (!t)
          s.push_back(c);
        else
          break;
      }
    }
    return *this;
  }
  template <class T>
  NORMAL_IN &operator>>(vector<T> &v) {
    int v_size = v.size();
    for (int i = 0; i < (int)(v_size); ++i) {
      *this >> v[i];
    }
    return *this;
  }
} normal_in;
struct NORMAL_OUT {
  NORMAL_OUT &operator<<(const int &n) {
    fprintf(file_out, "%d", n);
    return *this;
  }
  NORMAL_OUT &operator<<(const unsigned int &n) {
    fprintf(file_out, "%u", n);
    return *this;
  }
  NORMAL_OUT &operator<<(const long long &n) {
    fprintf(file_out, "%lld", n);
    return *this;
  }
  NORMAL_OUT &operator<<(const unsigned long long &n) {
    fprintf(file_out, "%llu", n);
    return *this;
  }
  NORMAL_OUT &operator<<(const double &n) {
    fprintf(file_out, "%lf", n);
    return *this;
  }
  NORMAL_OUT &operator<<(const long double &n) {
    fprintf(file_out, "%Lf", n);
    return *this;
  }
  NORMAL_OUT &operator<<(const char c[]) {
    fprintf(file_out, "%s", c);
    return *this;
  }
  NORMAL_OUT &operator<<(const string &s) {
    fprintf(file_out, "%s", s.c_str());
    return *this;
  }
} normal_out;
struct ERR_OUT {
  template <class T>
  ERR_OUT &operator<<(const T &a) {
    cerr << "\x1b[7m" << a << "\x1b[m";
    return *this;
  }
} ferr;
template <class T>
struct Imos {
  vector<T> v;
  int cur_i;
  T cur_sum;
  Imos(int n) {
    v.assign(n + 1, 0);
    cur_i = -1;
    cur_sum = 0;
  }
  void range_add(const pair<int, int> &p, T d) {
    v[p.first] += d;
    v[p.second] -= d;
    if (p.first <= cur_i) cur_sum += d;
  }
  T get(int i) {
    for (; cur_i < i; cur_i++, cur_sum += v[cur_i])
      ;
    return cur_sum;
  }
};
const int D = 540;
void solve(long long N, long long M, vector<long long> l, vector<long long> r) {
  Imos<int> imos(M + 10);
  for (int i = 0; i < (int)(N); ++i) {
    for (int k = 1; k < D; k++) {
      if ((l[i] + k - 1) / k <= r[i] / k) {
        imos.range_add({k, k + 1}, 1);
      }
    }
    bool end = false;
    for (int t = 1; !end; t++) {
      int left = (l[i] + t - 1) / t, right = r[i] / t;
      if (left <= D) {
        end = true;
        left = D;
      }
      if (left <= right) imos.range_add({left, right + 1}, 1);
    }
  }
  for (int k = 1; k <= M; k++) {
    normal_out << imos.get(k) << "\n";
  }
}
int main() {
  long long M;
  long long N;
  scanf("%lld", &N);
  vector<long long> l(N - 1 + 1);
  vector<long long> r(N - 1 + 1);
  scanf("%lld", &M);
  for (int i = 0; i <= N - 1; i++) {
    scanf("%lld", &l[i]);
    scanf("%lld", &r[i]);
  }
  solve(N, M, l, r);
  return 0;
}
